none
vs2010: Where is Tooltip property for a Windows form?

    Question

  • I just started a Windows app using VisualStudio v10 VisualBasic and there is no Tooltip in a command button's properties.


    software developer
    Saturday, August 07, 2010 2:08 PM

All replies

  • add a ToolTip from the toolbox and the property in button1's properties should appear as "ToolTip on ToolTip1 ".

    anti-social
    • Proposed as answer by Liliane Teng Thursday, August 12, 2010 8:07 AM
    • Marked as answer by Liliane Teng Friday, August 20, 2010 7:28 AM
    • Unmarked as answer by _Doug Bell Tuesday, August 31, 2010 2:12 PM
    Saturday, August 07, 2010 2:21 PM
  • Hello _Doug Bell,

    Thanks for your post.

    secondcode has given you helpful suggestion. Please have a try. If you have any comments, please feel free to follow up.

    Here I provide you more infromation about programmatically creating a ToolTip for a Windows Forms control. Hope it helps.

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim ToolTip1 As New System.Windows.Forms.ToolTip()
            ToolTip1.SetToolTip(Me.Button2, "Hello")
    End Sub

    Best regards,
    Liliane
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. Thanks
    • Proposed as answer by Cor LigthertMVP Thursday, August 12, 2010 8:25 AM
    • Marked as answer by Liliane Teng Friday, August 20, 2010 7:28 AM
    • Unmarked as answer by _Doug Bell Tuesday, August 31, 2010 2:12 PM
    Thursday, August 12, 2010 8:14 AM
  • I did not understand your question and after proposing the answers and thinking it were the correct answers, I wanted to tell that you could also use the designer.

    The suddenly the quarter felt probably in the right way (I don't know it this is an International phrase)

    The command buttons close and maximize/minimize have their default tooltips.

    (Accoording to your language settings)


    Success
    Cor
    Thursday, August 12, 2010 8:30 AM
  • That fixed it.

    Why did they add Tooltip to the Toolbox?


    software developer
    Tuesday, August 31, 2010 2:13 PM
  • Doug,

    The ToolTip component in the toolbox is what is called an extender control. The reason there isn't just a tooltip caption you can set on each control is because in .NET tooltips have a lot of properties that can be set.

    For example, when you add a tooltip to the form, there are properties to set how long the tooltip will display, the color of it, the look, and various other formatting options.

    Now imagine for every single control that should have some tooltip text, you had to set all those values, that would be very cumbersome, especially considering usually all controls that use a tooltip on a form will look similar.

    So by using this extender control method, it allows you to set all these properties in 1 common place, and then allows you to just set the text for each control that should display a tooltip, and the tooltip will use the settings you specified once.

    Make sense?


    Matt Kleinwaks - MSMVP MSDN Forums Moderator - www.zerosandtheone.com
    Tuesday, August 31, 2010 4:37 PM
    Moderator