Results 1 to 6 of 6

Thread: [2008] Tooltip for menu item

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    India
    Posts
    526

    Question [2008] Tooltip for menu item

    Hello Everyone,

    I am using Visual Studio 2008 (with focus in VB.NET). I want to add tooltip to the menu items in the menus I have created.

    Now I know that menu items have a property call tooltip and if I type text there, tooltips are displayed. But I want to use tooltip control for that because it gives me flexibility of changing colours or adding a heading to tooltips.

    I was able to bound tooltip control for controls on forms like button, textbox etc. But how can I achieve the same for menu items. Basically I want that my tooltips for menus have a heading also and If I want I can change colours.

    Help will be appreciated.

    Thank You,

    Cheers,
    GR

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2008] Tooltip for menu item

    Can't be done. First up, ToolTip doesn't inherit the Control class so it is not a control. It's a component. As for the question, ToolTips can be attached to controls only. The ToolStripMenuItem is not a control either, so a ToolTip component cannot be attached to it. You'd most likely have to inherit the ToolStripMenuItem class and write some cutom code to control how it draws its own tool tip.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    India
    Posts
    526

    Post Re: [2008] Tooltip for menu item

    Thanks for the info dude. Though I am not very good with classes, can I get some sample code so that I can implement the same. Cheers.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2008] Tooltip for menu item

    I'm afraid I wouldn't know. It's going to be far from trivial and will require a reasonable amount of research as you're going to be getting into the bowels of the class somewhat.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    India
    Posts
    526

    Re: [2008] Tooltip for menu item

    I guess I will drop the idea of tooltip for menus for a while. It was not very critical anyways.

    Cheers ;-)

  6. #6
    New Member
    Join Date
    Nov 2010
    Location
    U.S.
    Posts
    15

    Re: [2008] Tooltip for menu item

    I know it's too late for this post, but for future reference, there is a tooltip available in the properties window at the right, for the individual items in the toolstrip. Tooltips cannot be added by code without a lengthy process.

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