CUSTOM tooltips in VB.NET (bold, italic ...)

Well it's not a major problem but it visually would look better I have a text line wich cannot fit in control wich i am displaying it so when mouse hovers over that text it is shown in a tooltip Text exmp: Name: John ,Last Name: ... and so on Is there any way to make part of my tooltip bold Name: John ,Last Name: ... like this Thank you for your answers and time.


Answer this question

CUSTOM tooltips in VB.NET (bold, italic ...)

  • Michael Stokesbary

    I consider the possibility to specify the coordinates an advantage.

    It is easier for a command button since you already have the coordinates, but with the line number of the ListView (and a little trial and error) you should be able to place it where you want.

    I found this method quite useful on the HScrollBar to show useful info in the textbox as the cursor was dragged. But in this case, I only need to place it a bit left or right of the cursor being dragged.



  • alex express

    This link has an excellent example

    http://www.vbaccelerator.com/home/NET/Code/Controls/Popup_Windows/Floating_Controls/article.asp

    Just set the font before DrawString in OnPaint of the FloatControl


  • Jetcity73

    The only text-box that seems to give much text formatting is the RichTextBox.
    You can make use of Bold, Colors, highlighting etc , and also select the screen position (Left, top). If you already have the text+formatting, you could make an rtf file in Word and Load it into the Box: RichTextBox1.LoadFile("c:\subdir\RichTextFile2.rtf"). Otherwise you will have to make it in code.

    So instead of the limited Tooltip, you could have a fancy RichTextBox that is Visible on the MouseHover event of your control, and Visible=False for the MouseLeave event.


  • HY

    Well I thought about that Thanks for it anyway, but just wodering isn't there any simplier way to this Because with rtf i need to specify coordinates where to show a tooltip on each LISTVIEW item when i hover over it. If no more ideas will show up i guess i'l go with richtextbox.



  • QuintPro

    I wrote an article discussing this very topic. The answer is yes, you can do exactly what you are looking to do. To see a real-world example of custom tooltips (using the information from the article), there is a picture located at: http://addressof.com/blog/archive/2006/06/25/11888.aspx. The article is located at: http://addressof.com/blog/articles/ToolTipVoodoo.aspx.


  • CUSTOM tooltips in VB.NET (bold, italic ...)