I have to create a RichText that behaves like a tooltip
Hello,
I have a task to provide a RichTextBox control that behaves like a tooltip, ie:
1. Hovering when mouse moves
2. Remove after N seconds (customizable) or if the user closes it (by "X" button)
The regular tooltip does not provide a RichText capabilities (else I'd take it)
Can you advice how to apply? Should I take a form and put a RichText inside, and set the form properties accordingly? Something else?
Thank you
Re: I have to create a RichText that behaves like a tooltip
You can add a borderless form name it e.g. frmTooltip, add a RichTextBox when the mouse hover on a control, fill the frmTooltip.RichTextBox with the tooltip, adjust its size and position then show it.
On a control MouseLeave event start a timer with desired interval to hide frmTooltip.
Re: I have to create a RichText that behaves like a tooltip
Re: I have to create a RichText that behaves like a tooltip
Yes 4x2y is a very helpful man, and very good at VB..
Re: I have to create a RichText that behaves like a tooltip
do you need an editable tooltip or just richtext style display?
you can ownerdraw a tooltip, with any fonts or fontcolors, images, etc.
Re: I have to create a RichText that behaves like a tooltip
Quote:
Originally Posted by
.paul.
do you need an editable tooltip or just richtext style display?
you can ownerdraw a tooltip, with any fonts or fontcolors, images, etc.
He may not want to go that way. Another user here recently asked about a control that he can use to highlight letters as he types in a text box. This gave me the idea of making a rich label that can do such a thing and let me tell you it takes some work even just to implement multi-colour text. Its not that much though but just not something you can put together in 10 minutes.