View previous topic :: View next topic |
Author |
Message |
mutouaa
Joined: 07 Nov 2007 Posts: 24
|
Posted: Fri Jul 23, 2010 5:13 am Post subject: Icon Tooltip |
|
|
Hello Infralution Group,
Here I face a tooltip problem with tree Icon.
in the tree MainColumn, I have an Icon (set in GetRowData event handler) and text on the right of Icon. I hope to show different tooltip in both Icon and text, is that possible? or can I set tooltip for a whole row?
Thank you in advance! |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Jul 23, 2010 8:02 am Post subject: |
|
|
VirtualTree only supports by default Tooltips on cells. If you want to have a tooltip on the Row (or Row icon) then you would need to create your own custom RowWidget class (see "Using Widgets" in the help for more detail) then you would override the OnMouseEnter/OnMouseLeave methods to show your tooltip. The Tree provides methods you can use to do this eg:
Code: | public override void OnMouseEnter(MouseEventArgs e)
{
string toolTipText = GetToolTipText();
if (toolTipText != null)
{
Tree.ShowToolTip(toolTipText);
}
}
public override void OnMouseLeave(EventArgs e)
{
Tree.HideToolTip();
} |
_________________ Infralution Support |
|
Back to top |
|
|
|