Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 793363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:08:24+00:00 2026-05-14T22:08:24+00:00

Guys, I have a windows form with a panel control and inside the panel

  • 0

Guys, I have a windows form with a panel control and inside the panel control are several other controls with a System.Windows.Forms.Tooltip attached to them. How can I iterate through each tooltip and set the Active property of the tooltip to false? Tooltips, unlike other controls, are not actually controls. So I had this:

foreach (System.Windows.Forms.Control ctrl in this.pnlControl.Controls)
{
    if (ctrl.Name.StartsWith("tt")) // since all my tooltip names start with 'tt'
    {
        System.Windows.Forms.ToolTip TipControl=(System.Windows.Forms.ToolTip)ctrl;

        TipControl.Active=false;
    }
}

This does not work though. It gets an error because the ToolTip control is not inherited from System.Windows.Forms.Control. Any ideas?

EDIT:
Okay Guys. I probably didn’t go into enough detail to get the answer I needed. My problem is, I’m taking all the controls in my panel and moving them to a different panel. Once they are switched over, the tooltips are still attached to the controls, which is what I want. However I have no way to deactive or reactivate them once I move them since the form and the original panel no longer exist. However, I found a solution which I will post here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:08:25+00:00Added an answer on May 14, 2026 at 10:08 pm

    How to add tool tips for two buttons? The correct way is NOT creating two instances of ToolTip in this way:

     ToolTip tt1 = new ToolTip();   //or you can create one in the designer
     tt1.ToolTipTitle = "test";
     tt1.SetToolTip(button1, "caption1");
     ToolTip tt2 = new ToolTip();
     tt2.ToolTipTitle = "test2";
     tt2.SetToolTip(button2, "caption2");
    

    Remember that a ToolTip instance and a control are not one-on-one related. The right way for this example is:

    ToolTip tt1 = new ToolTip();   //or you can create one in the designer
    tt1.ToolTipTitle = "test";
    tt1.SetToolTip(button1, "caption1");
    tt1.SetToolTip(button2, "caption2");
    

    To remove the tooltip of button2, use:

    tt1.SetToolTip(button2,string.Empty);
    

    For your case,we can use

    foreach(Control c in this.Controls)
    {
       tt.SetToolTip(c,string.Empty);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.