Tooltip not showing in textbox when it is enabled as false

1 Answer 348 Views
TextBox TextBoxControl
Aravind
Top achievements
Rank 2
Iron
Iron
Iron
Aravind asked on 24 Jul 2023, 10:30 AM | edited on 24 Jul 2023, 10:31 AM

Hi,
     I try to set tooltip for textbox which is disabled , it not showing tooltip, but if the textbox in enabled it showing, Is there any way to show tooltip while it disabled ?

I tried following ways , but not working
in 2nd way i added Windows ToolTip control in that form and set the value for radtexbox, but not working.


       RadTextBoxControl1.Enabled = False
       '1 st way
        RadTextBoxControl1.TextBoxElement.ToolTipText = "This is the tooltip text."
        '2 nd way
        ToolTip1.SetToolTip(RadTextBoxControl1, "This is the tooltip text.")


Pls reply asap
Regards
Aravind
Todor
Telerik team
commented on 25 Jul 2023, 11:25 AM

Hi, Aravind,

The disabled controls do not receive mouse events and this is the reason why the tooltip is not shown.

There are two possible solutions for this case:

  • Enable the control, but make it Read-only, so the tooltips will be shown(you can customize the background, foreground, and border colors so the control looks disabled).
  • Keep the control disabled, handle mouse events in the form , and show the tooltip when necessary.

Here are a few StackOverflow questions on this topic:

1 Answer, 1 is accepted

Sort by
0
Accepted
Aravind
Top achievements
Rank 2
Iron
Iron
Iron
answered on 01 Aug 2023, 03:20 AM
Thanks Todor Vyagov, if textbox is not enabled , then tooltip not showing, if i set read only then showing , thanks for your reply.
Tags
TextBox TextBoxControl
Asked by
Aravind
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Aravind
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or