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
85
Check the status of the Toolbar menu
posted

 

Hi,

I have a toolbar with submenus. One of the scenario needs to check the status of one toolbar  menu.

If the status is disabled, it should select another toolbar menu.  How can I check the status of the toolbar?

Can someone help me?

Thanks in advance

Tinu

Parents
  • 7695
    Offline posted

    The solution I am providing unfortunately at the time is limited to simple menus, but with any luck that is the type you are using. This will not work on any of the Ribbon based menus, Navigation Toolbar, or MiniToolbar. We are looking to implement a similar style for other tools soon.

    That being said, you should be able to use the GetItemProperty method such as:

    Set oTBDockArea = SwfWindow("Form1").SwfToolbar("_Form1_Toolbars_Dock_Area_Top")
    msgbox oTBDockArea.GetItemProperty("RootMenu", "SubMenu","Enabled")

    The first and second parameters are parameters similar to if you were to record your action on the Menu.

    If you are using a different style of toolbar you will likely need to get the tools property directly, and that typically would require knowing how your developer setup toolbars.

     

    Hope this helps,

Reply Children