Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
add to a ToolStripItem the click event of Infragistics.Win.UltraWinToolbars.ToolBase
posted

can any one help me to do this? i want to add to a ContextMenuStrip a tool of a UltraToolbarsManager, the text and the image is no a problem, but i cant add the event.

tnx

 

  

Dim miTool As Infragistics.Win.UltraWinToolbars.ToolBase = UltraToolbarsManager.Tools("any_key")

Dim mItem As ToolStripItem

mItem = ContextMenuStrip1.Items.Add(miTool.SharedProps.Caption, miTool.SharedProps.AppearancesSmall.Appearance.Image)

mItem.Enabled = tool.SharedProps.Enabled

'how to do this?

addhandler mItem.Click,addressof tool........

Parents
  • 45049
    posted

    Use the ToolClick event of the WinToolbarsManager component in this circumstance.  When handling this event, "e.Tool" will be the instance of the tool that was clicked to raise the event.  In a typical implementation, you'd implement a "Select Case" statement (or "switch" in C#) to take different action based on the value of e.Tool.Key.

    We recommend against directly handling the ToolClick event of the ToolBase instance itself.

Reply Children