Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi' I'd like to add a tooltip to MenuItem (member of ContextMenu)

 

how can I do that?

 

This code does not work (Value of type 'System.Windows.Forms.MenuItem' cannot be converted to 'System.Windows.Forms.Control'):

 

        Dim m As MenuItem = Me.ContextMenu1.MenuItems(0)
       Me.ToolTip1.SetToolTip(m, "blablabla")

 

tx,

 

 

matej

  • Leaders
Posted
I don't know if you want a tooltip on menu items. Seems like too many things popping up. Describing what menu items do is generally done via the status bar. On the MenuItem.Select event you can put a tip in the status bar.
[sIGPIC]e[/sIGPIC]
Posted
As far as I know there is no standard way of displaying a toolip from a context menuitem. Also, there are no events that would help display a help box. You could make your own control.
Posted
You write a class which implements IExtenderProvider and use it to link the tooltip to the menu item. Specifically in this case you subscribe to the Select event of the MenuItem and use that to set a specified Text property on another control. Its not so hard to implement once you've read around the subject of the componant model and IExtenderProvider a little, have a look.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...