AD
Administrator
Syncfusion Team
January 18, 2005 08:04 PM UTC
If you are deriving the GridDataBoundGrid, you can override
protected override ToolTip CreateCellToolTip()
{
ToolTip tip = base.CreateCellToolTip();
return tip;
}
and get at the ToolTip. If you only need to set the size there, then that would be all you would need. If you want to set it dynamically as teh tool is displayed, you can save a reference to the tooltip in the override, an dthen use this reference in an OnActivateToolTip override or in the event.
AD
Administrator
Syncfusion Team
January 18, 2005 08:29 PM UTC
Hi Clay
Thanks for the code.
protected override ToolTip CreateCellToolTip()
{
ToolTip cellTip = base.CreateCellToolTip();
cellTip.SetToolTip( this, "T" );
cellTip.SetToolTip( this, string.Empty );
object handle = typeof(System.Windows.Forms.ToolTip).InvokeMember(
"Handle",BindingFlags.NonPublic|BindingFlags.Instance|BindingFlags.GetProperty,
null,cellTip,null);
if( handle != null )
{
IntPtr hwnd = (IntPtr)handle;
SendMessage(hwnd,0x0418, 0, 300);
}
return cellTip;
}
The tooltip have to be set to an dummy value, otherwise the handle of the tooltip window is null and this causes an exception.
Regards
Thomas