[RESOLVED] Tooltip, hand cursor in rich text box
Good day,
Using a rich text box, I select certain words that I recolor to blue and underline, to give the "hyperlink" appearance. A sample text might appear as follows:
Last week, Smith taught Jones how to program in VB6.
Now for the highlighted text, I would like to add a custom tooltip and a custom cursor (I'm using hand.ico). The problem is that the .tooltiptext and .mouseicon properties of the rich text box apply to the whole box, whereas I only want to fire the tooltip and hand cursor when the mouse hovers over the selected text.
One more problem: The text string is being fed in by the application, so I do not want the user to be able to edit it. But when you set the .enabled property of the rich text box to 'false', tooltips and custom cursors also get disabled.
As always, thanks for any help you can provide.
Re: Tooltip, hand cursor in rich text box
Quote:
Originally Posted by Keith Lockhart
One more problem: The text string is being fed in by the application, so I do not want the user to be able to edit it. But when you set the .enabled property of the rich text box to 'false', tooltips and custom cursors also get disabled.
In the keypress, keydown and keyup events, set the key (keycode, keyascii) to 0.
Re: Tooltip, hand cursor in rich text box
Al42,
Thank you for the reply. However, whereas changing the key does prevent the user from editing, it allows the user to access the rich text box with an I-bar cursor, which gives the user a visual cue that they should be able to edit the text...not really the cue I want to send.