Results 1 to 3 of 3

Thread: [RESOLVED] Tooltip, hand cursor in rich text box

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2006
    Posts
    28

    Resolved [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.

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    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.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2006
    Posts
    28

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width