[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
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.
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. :thumb:
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.
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 ;-)
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.