Results 1 to 6 of 6

Thread: I have to create a RichText that behaves like a tooltip

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2009
    Posts
    128

    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

  2. #2
    PowerPoster
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    2,579

    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.



  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2009
    Posts
    128

    Re: I have to create a RichText that behaves like a tooltip

    Thank you

  4. #4
    Member
    Join Date
    Feb 2012
    Posts
    56

    Re: I have to create a RichText that behaves like a tooltip

    Yes 4x2y is a very helpful man, and very good at VB..

  5. #5
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,464

    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.

  6. #6
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: I have to create a RichText that behaves like a tooltip

    Quote Originally Posted by .paul. View Post
    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.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

Tags for this Thread

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