Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

tooltips on cells

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
keesp
Guest





PostPosted: Thu Jun 02, 2005 12:56 pm    Post subject: tooltips on cells Reply with quote

Hi,

Is it possible to define tooltips at the level of individual cells, or is a windows tooltip extender required?

Thanx,

keesp
Back to top
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Jun 03, 2005 4:39 am    Post subject: Reply with quote

You can't currently define normal tooltips for individual cells - but this is on our list of features to add. Let us know if this is really important to you and we may be able to bump it up the priority list.

Note that if you want tooltips for displaying error information this functionality is already available. See the section in the online help on "Displaying Data Errors".
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Eric



Joined: 06 Oct 2005
Posts: 15
Location: Regensburg, Germany

PostPosted: Tue Oct 25, 2005 4:42 pm    Post subject: Reply with quote

I would like to be able to show tooltip per cell.
Actually, tootip is a string member of myNode object (objectbinding in virtualtree with arraylist of myNode). It would be great if the tooltip could be shown as a property of the object. I mean object binding require properties for child and parents, why not such a property for tooltip...
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Oct 25, 2005 10:53 pm    Post subject: Reply with quote

You can currently set a tooltip to display for a particular cell (via the tooltip property of the CellBinding). This tooltip can contain a placeholder for the cell value. So if the cell value was "Fred Bloggs" you could define a tooltip like: "Sender: {0}" and the resultant tooltip would be "Sender: Fred Bloggs". Currently you can't using Object Binding to set the tooltip to come from another property of the object - although you can do this programmatically by overriding the GetCellData method and setting the CellData.Tooltip property (see examples which mix object binding and programmatic binding).

We could add this as a feature request if you need it.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Eric



Joined: 06 Oct 2005
Posts: 15
Location: Regensburg, Germany

PostPosted: Tue Nov 08, 2005 8:13 pm    Post subject: Reply with quote

I'd like to know how we can see the tooltip. I did not see in your sample one that uses the tooltip.

Actually, I am using object binding: my tree is a list of Node1st, and this object has a property "Tooltip".
The following code should work, shouldn't it ?
Code:
private void MainTree_GetCellData(object sender, Infralution.Controls.VirtualTree.GetCellDataEventArgs e)
{
   VirtualTree virtualtree = (VirtualTree)sender;
   RowBinding rowbind = virtualtree.GetRowBinding(e.Row);
   
   Node1st node1 = (Node1st)e.Row.Item;
   if (node1.Tooltip != null)
      e.CellData.ToolTip = node1.Tooltip;

   // get the default binding for the given row and use it to populate the cell data
   rowbind.GetCellData(e.Row, e.Column, e.CellData);
}

I've just checked in debug mode, and e.CellData.ToolTip is taking correctly my string from node1. Where is the tooltip drawn in the tree?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Nov 08, 2005 9:34 pm    Post subject: Reply with quote

You need to set the e.CellData.ToolTip AFTER calling rowBind.GetCellData. Otherwise it will overwrite your tooltip with the default (which is none).

The tooltip should appear when you hover the mouse over a cell with a tooltip set. You can see this on the sample projects if you change the width of a column so that the cell text no longer fits - then if you hover the mouse a tooltip with the full text should appear.

If you set a non-null tooltip then it should appear regardless whether the cell text fits.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group