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
555
toolbutton.InstanceProps = null, can't set IsFirstInGroup = true;
posted

The following code shows what I' am try todo: I want to initialize a popup menu with a couple of menu item programmatically. Some of them should be regrouped and the group should be separated by horizontal separator lines:

ultraToolbarsManager > ultraToolbar > popup >

menu item1

menu item2

--------------------------------

buttonToolGenerateHA

menu item3

menu item4

 

ultraToolbarsManager "ultraToolbarsManagerDP" contains a ultraToolbar "ultraToolbarDP" to which a popup menu "popupFunctions" containing the menu (buttontool) item "buttonToolGenerateHA" should be appended

before the menu item a separator line should be placed, why I set the IsFirstInGroup property to true.

I tried different combination, actually I can't set the property, either  buttonToolGenerateHA.InstanceProps is null or setting the IsFirstInGroup property is ignored. The menu item are displayed without separator

Any idea to init the tools correctly programmatically?

----------------------------------

//>>> buttonToolGenerateHA.InstanceProps != null

 

           

ultraToolbarDP.NonInheritedTools.AddRange(new ToolBase[] { popupFunctions,});

          

ultraToolbarsManagerDP.Toolbars.AddRange(new UltraToolbar[] { ultraToolbarDP, });

        

//>>> attach Tools to the Toolbar manager

 

ultraToolbarsManagerDP.Tools.Add(buttonToolGenerateHA);

 

//>>> buttonToolGenerateHA.InstanceProps = null!

                

popupFunctions.Tools.Add(buttonToolGenerateHA);

 

???  when to set buttonToolGenerateHA.InstanceProps.IsFirstInGroup = true; ???

Parents Reply Children
No Data