Search code examples
c++user-interfacetooltipc++buildervcl

How to show tooltip for longer time in C++ Builder?


I have a tooltip shown to an Image

ImageIcon->Hint = "This is a long tooltip I need some more time to read it";

I want to increase the showing time of this tooltip.

Please, Anyone can help me regarding this?


Solution

  • You may handle the OnShowHint event of your Application object. When this event handler is called, change the HideTimeout attribute of the HintInfo parameter. The value can been chosen depending on the hint's length and the control that the hint is being prepared for. I found this approach more appropriate than increasing the HintHidePause property of TApplication, because hints can vary heavily in length, and very short hints can also be very annoying when shown for too long time.

    For reference, start reading the following article: