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
430
Mouse over the ribbon cause an error
posted

Hello, 

I created a toolbar manager and put dynamically groups and items on it. but when the mouse is over it it cause an error :

System.NullReferenceException:.
   ב-  Infragistics.Win.UltraWinToolbars.SharedProps.get_ShortcutString()
   ב-  Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.DisplayToolTip(ToolBase tool)
   ב-  Infragistics.Win.UltraWinToolbars.ToolBase.DisplayToolTip()
   ב-  Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.set_ImmediateToolTipDisplayMode(Boolean value)
   ב-  Infragistics.Win.UltraWinToolbars.ButtonToolUIElement.OnMouseHover()
   ב-  Infragistics.Win.ControlUIElementBase.NotifyMouseHover(UIElement element)
   ב-  Infragistics.Win.ControlUIElementBase.ProcessMouseHover(Object sender, EventArgs e)
   ב-  Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)
   ב-  Infragistics.Win.UltraControlBase.OnMouseHover(EventArgs e)
   ב-  System.Windows.Forms.Control.WmMouseHover(Message& m)
   ב-  System.Windows.Forms.Control.WndProc(Message& m)
   ב-  System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   ב-  System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   ב-  System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

Thanks,

Yossy

Parents Reply
  • 44743
    Verified Answer
    posted in reply to Yossy

    This looks like it could be a bug. I would recommend submitting the issue to the support group: http://es.infragistics.com/gethelp. You might be able to work around the issue by adding the tools in a different way. For the first set of tools added, create the tools as you are but only set values on their SharedProps. Then add them to the toolbars manager, not the group. Then, on the group, add new instances of the tools like this:

    grpCard_Save.Tools.AddToolRange(new string[{ "btnCard_Save", "btnCard_SaveAll" });

    Get the new instance tools back from the group and set the properties on their InstanceProps like this:

    ToolBase tool1 = grpCard_Save.Tools[ "btnCard_Save" ];
    tool1.InstanceProps.PreferredSizeOnRibbon = RibbonToolSize.Large;

    As for the tools added to the application menu, when you add the tools to the ToolAreaLeft, don't add the tools to the NonInheritedTools collection. This is only needed for design-time support when visual inheritance may be used. Instead, use the Tools.AddToolRange method as shown above and pass in the tool keys.

Children