ComponentOne SuperTooltip for WinForms
SuperTooltip for WinForms Quick Start / Step 4 of 4: Adding Code for the Buttons and Running the Project
In This Topic
    Step 4 of 4: Adding Code for the Buttons and Running the Project
    In This Topic

    Once you have created the C1SuperLabel and C1SuperTooltips, you can add code for the buttons on the form and run the project. To do this, complete the following steps:

    1. Double-click Button1 and add the following code to the Button1_Click event:

      To write code in Visual Basic

      Visual Basic
      Copy Code
      C1SuperLabel1.Visible = True
      

      To write code in C#

      C#
      Copy Code
      c1SuperLabel1.Visible = true;
      
    2. Double-click Button2 and add the following code to the Button2_Click event:

      To write code in Visual Basic

      Visual Basic
      Copy Code
      C1SuperLabel1.Visible = False
      

      To write code in C#

      C#
      Copy Code
      c1SuperLabel1.Visible = False;
      
    3. Run the project and mouse over Button1. Notice the ToolTip is a Vista-style C1SuperTooltip:
    4. Click View C1SuperLabel. The C1SuperLabel appears.
    5. Mouse over Button2. The Vista-style C1SuperTooltip looks like this:

      The text in the ToolTip for Button2 was applied through HTML markup, but you will notice the C1SuperTooltip Vista background style appears in both ToolTips. Any properties you set via the C1SuperTooltip Editor will be the same in all ToolTips for controls associated with that C1SuperTooltip.

    6. Click Hide C1SuperLabel, and the C1SuperLabel is hidden.