Show tooltips dynamically.

Hi,

1) How can I show tooltips to all column headers in a grid dynamically?

2) How can I show tooltip to text boxes, comboboxes, lookup textboxes etc... in a form dynamically?

Thanks
-Kishan


3 Replies

SR Sri Rajan Syncfusion Team August 7, 2008 08:50 AM UTC

Hi Kishan,

Thank you for your interest in Syncfusion products.

1) How can I show tooltips to all column headers in a grid dynamically?
-----------------------------------------------------------------------
You need to handle QueryCellInfo event and set the CellTipText Property for RowIndex 0, to show tooltips to all column headers in a grid dynamically.

void gridControl1_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e)
{
if (e.RowIndex == 0)
{
e.Style.CellTipText = "Tool tip text";
}
}


2) How can I show tooltip to text boxes, comboboxes, lookup textboxes etc... in a form dynamically?
------------------------------------------------------------------------
Please refer the below code to show ToolTip dynamically for TextBox and ComboBox.

ToolTip tooltip = new ToolTip();

void comboBoxAdv1_MouseHover(object sender, EventArgs e)
{
this.tooltip.SetToolTip(this.comboBoxAdv1, "ComboBox ToolTip");
}

void textBoxExt1_MouseHover(object sender, EventArgs e)
{
this.tooltip.SetToolTip(this.textBoxExt1, "TextBox ToolTip");
}


Please let me know if this helps.

Best Regards,
Srirajan.



AD Administrator Syncfusion Team August 8, 2008 02:41 AM UTC

HI Srirajan,

Thanks for reply.
Will you please send me sample application.

Regards
-Kishan



SR Sri Rajan Syncfusion Team August 8, 2008 05:17 AM UTC

Hi Kishan,

Thank you for your continued interest in Syncfusion products.

Here is the minimal sample which implements this task.
http://websamples.syncfusion.com/samples/grid.windows/F75688/main.htm

Please let me know if this helps.

Best Regards,
Srirajan.


Loader.
Up arrow icon