The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi Clay
I found a sample in the dotnet newsgroup that handles the size of the Tooltip window. Is there a way to get the instance of the tooltip in GDBG when you''re displaying the tooltip.
The sample gets the handle of the tooltip windows and sends a message.
object o = typeof(ToolTip).InvokeMember("Handle",BindingFlags.NonPublic|BindingFlags.Instance|BindingFlags.GetProperty,null,myTooltip,null); IntPtr hwnd = (IntPtr) o; SendMessage(hwnd,0x0418, 0, 300); }
Regards
Thomas
ADAdministrator 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.
ADAdministrator 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