Page Index Toggle Pages: [1] 2 3  Send TopicPrint
Very Hot Topic (More than 25 Replies) Tables (Read 26290 times)
rkon77
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Feb 12th, 2008
Tables
Feb 12th, 2008 at 11:10am
Print Post  
1. we are using the table.CellPicture function in order to load a picture to the cell.
this works fine, but what we need is the ability to toggle the image when the TableCellClicked event fires, how can we do that? since after we load a picture to the cell we can not do anything with the picture, we do not know the picture name and more.
Is there a way to do so?
2. Is there a way to get the table rows collection or cells collection?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Tables
Reply #1 - Feb 12th, 2008 at 12:08pm
Print Post  
You could used the CellVariantTag to keep the second image, and swap the CellPicture[col, row] and CellVariantTag[col, row] values when a cell is clicked. At this time the cell objects can be customized only through the indexed properties and methods of the Table class.

Stoyan
  
Back to top
 
IP Logged
 
rkon77
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Feb 12th, 2008
Re: Tables
Reply #2 - Feb 12th, 2008 at 1:33pm
Print Post  
1.can you please send me an example how can use the cell object?
2. another question: the control allows user to create arrows between rows of tables(dest table and origin table) is there a way to find out to wchich row the arrow is attcahed? (we are able to do it throught looping of the outing and incoming arrows of the row) is there an easier way?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Tables
Reply #3 - Feb 12th, 2008 at 2:13pm
Print Post  
1.
Code
Select All
Dim t As table
Set t = fcx.CreateTable(0, 0, 300, 300)
t.SetRowHeight 0, 150
t.SetColWidth 0, 150
t.CellPicture(0, 0) = LoadPicture("D:\Images\1.jpg")
t.CellVariantTag(0, 0) = LoadPicture("D:\Images\2.jpg")
t.SetText 0, 0, "click"

Private Sub fcx_TableCellClicked(ByVal table As FLOWCHARTLibCtl.ITableItem, ByVal button As FLOWCHARTLibCtl.EMouseButton, ByVal row As Long, ByVal col As Long)
	Dim temp As StdPicture
	Set temp = table.CellPicture(col, row)
	table.CellPicture(col, row) = table.CellVariantTag(col, row)
	table.CellVariantTag(col, row) = temp
End Sub
 



2. Use the arrows' OrgnIndex and DestIndex properties.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
rkon77
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Feb 12th, 2008
Re: Tables
Reply #4 - Feb 13th, 2008 at 10:05am
Print Post  
1. we have an image inside a table cell. is there a  way to show a tool tip on that image?

2. is there a way to change the order of the tables rows dynamically on the table?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Tables
Reply #5 - Feb 13th, 2008 at 10:55am
Print Post  
1. there isn't, unless you change the table's ToolTip while the mouse moves
2. to swap two rows:
- copy the contents of the 1st row' cells to a new row inserted just before the second one
- copy the 2nd row contents to the 1st row
- and then remove the 2nd row.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
rkon77
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Feb 12th, 2008
Re: Tables
Reply #6 - Feb 13th, 2008 at 12:27pm
Print Post  
thanks for the quick answers.

1. ok, so I can capture the move move event, but can i change the table tool tip according to the current row ? is there a way to know what row the mouse is on right now?
2. can I put 2 different pictures in 1 cell? if the answer is yes then how?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Tables
Reply #7 - Feb 14th, 2008 at 5:50am
Print Post  
1. You can add the caption and row heights to the table's Y coordinate until you find which row contains the mouse point. That's more complicated when there are spanning cells and collapsible sections defined for the table. The control has an internal method that returns a cell from point, and we can make it public through the COM API for you.

2. That's not possible at this time.

Stoyan
  
Back to top
 
IP Logged
 
rkon77
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Feb 12th, 2008
Re: Tables
Reply #8 - Feb 24th, 2008 at 7:47pm
Print Post  
the idea for making the method public seems ok, it will answer our needs, what should we do in order for you to make it happen?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Tables
Reply #9 - Feb 25th, 2008 at 10:27am
Print Post  
We have added ColumnFromPoint and RowFromPoint methods to the Table class:
https://mindfusion.org/_beta/fcx_cellfromxy.zip

You can use them as shown below.

Code
Select All
Private Sub fcx_MouseMove(ByVal docX As Long, ByVal docY As Long)
	Dim t As Table
	Set t = fcx.GetTableAt(docX, docY)
	If Not t Is Nothing Then
		Dim col As Integer
		Dim row As Integer
		col = t.ColumnFromPoint(docX, docY)
		row = t.RowFromPoint(docX, docY)
		If col > -1 And row > -1 Then
			t.ToolTip = Str(col) + " " + Str(row)
		End If
	End If
End Sub

Private Sub Form_Load()
	fcx.FireMouseMove = True
	fcx.ShowToolTips = True
	...
End Sub
 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
rkon77
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Feb 12th, 2008
Re: Tables
Reply #10 - Feb 26th, 2008 at 7:01am
Print Post  
1. Is there a way to change the cell text to be like aN hyperlink? I mean adding a line under the text and chaNging the cell mouse cursor to hand

  
Back to top
 
IP Logged
 
rkon77
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Feb 12th, 2008
Re: Tables
Reply #11 - Feb 26th, 2008 at 7:20am
Print Post  
1. we are using the flow chart control in the web. how can I define new font or change the current font to bold?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Tables
Reply #12 - Feb 26th, 2008 at 9:50am
Print Post  
You could set the Underline property for the CellFont, and set CellTextColor = blue.

Stoyan
  
Back to top
 
IP Logged
 
rkon77
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Feb 12th, 2008
Re: Tables
Reply #13 - Feb 26th, 2008 at 5:19pm
Print Post  
we are using tables,if a table is being selected the user can press the "Delete"  key and delete the selected table, how can I prevent it?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Tables
Reply #14 - Feb 27th, 2008 at 5:43am
Print Post  
Handle the RequestDeleteTable event and set delete = false.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 3 
Send TopicPrint