How to set ToolTip for C1TextBox, C1DateEdit, C1NumericEdit?

Posted by: abraham on 20 March 2025, 10:07 pm EST

    • Post Options:
    • Link

    Posted 20 March 2025, 10:07 pm EST - Updated 21 March 2025, 1:45 am EST

    Another migration related issue/question:

    In the .NET 4.8 version of the C1 Winforms suite a ToolTip for a C1Label, C1TextBox, C1DateEdit, C1NumericEdit could be set with:

    ToolTip toolTip = new ToolTip();
    toolTip.SetToolTip(this.c1TB_Name, "Name");

    But with the latest 8.0.20241.664 version of the C1 Winforms suite - this approach only works correctly for C1Label; for C1TextBox, C1DateEdit and C1NumericEdit, the code above compiles/runs, but the ToolTip will not show for a C1TextBox, C1DateEdit and C1NumericEdit control.

    However when at runtime querying e.g. a C1TextBox, the correct ToolTip text is returned (‘Name’):

    toolTip.GetToolTip(this.this.c1TB_Name);

    I can’t find any documentation/example on how to configure a plain Winforms ToolTip for the C1TextBox, C1DateEdit and C1NumericEdit .NET 6+ controls. The inconsistency with C1Label is remarkable.

  • Posted 24 March 2025, 6:39 am EST

    Hi Abraham,

    Our C1 NET8 WinForms controls like C1Label; for C1TextBox, C1DateEdit and C1NumericEdit, extends XViewLight class (https://developer.mescius.com/componentone/docs/win/online-input-net/C1.Win.8~C1.Framework.XViewLight_members.html). This class internally uses C1SuperToolTip for implementing tooltips. Therefore, you will require to use the C1SuperToolTip control to show tooltips for these control. Here is the code implementation for the same:

    C1SuperTooltip tooltip = new C1SuperTooltip();
    tooltip.SetToolTip(c1TextBox1, "textbox tooltip");
    tooltip.SetToolTip(c1Label1, "label tooltip");
    tooltip.SetToolTip(c1NumericEdit1, "numericbox tooltip");
    tooltip.SetToolTip(c1DateEdit1, "datetime tooltip");

    NuGet package: https://www.nuget.org/packages/C1.Win.SuperTooltip

    Documentation link: https://developer.mescius.com/componentone/docs/win/online-supertooltip/overview.html

    Kindly refer to the attached sample for full implementation. See

    TooltipDemo.zip

    Thanks & regards,

    Aastha

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels