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
It looks like the SharedProps of the root tools are not getting hooked up to their owning tools correctly. What code do you use to dynamically create one of the tools added to the ribbon group?
Hello Mike,
This is a sample of the code:
m_hMemuBar.Ribbon.QuickAccessToolbar.Visible = false;
ButtonTool[ btnToolCard_Save = new ButtonTool[2] { new ButtonTool("btnCard_Save"), new ButtonTool("btnCard_SaveAll") };
btnToolCard_Save[0].InstanceProps.PreferredSizeOnRibbon = RibbonToolSize.Large;
btnToolCard_Save[1].SharedProps.Caption = "שמור הכל";
btnToolCard_Save[1].SharedProps.AppearancesLarge.Appearance.Image = new System.Drawing.Icon(Constants.Constants.IconsPath() + "save_all.ico").ToBitmap();
grpCard_Save.Tools.AddRange(btnToolCard_Save);
buttonTool1.SharedProps.Caption = "הגדרות";
buttonTool5.SharedProps.Caption = "יציאה";
m_hMemuBar.Tools.AddRange(new ToolBase[ { buttonTool1, buttonTool5 });
m_hMemuBar.Ribbon.ApplicationMenu.ToolAreaRight.MaxWidth = 0;