Forum Discussion

Damon_Wang's avatar
Damon_Wang
Occasional Contributor
12 years ago

How to get button object of ToolBar

Hi,



I'm facing a problem to get the button state of ToolBar. Anyone can give any suggestions?

Actually, I'm able to click that button by below scripts.

ToolBar.ClickItem("Parent|Child 1")

What I want is to get 'Child 1' object state, like it's enabled or disabled.

Add the ToolBar wndclass to MSAA works for me, but I don't want to to do that, because that wndclass name is using everywhere in my testing application. So if I add that to MSAA, then every controls in my application can be reconized, even a cell in grid.

Class name is UltraToolbarsDockArea,

Vendor is Infragistics



Thanks in advance.

1 Reply

  • Damon_Wang's avatar
    Damon_Wang
    Occasional Contributor
    My co-works helped me work it out.



    Using below scripts.

    ToolbarsManager.Toolbars.Item(0).Tools.Item(2).EnabledResolved



    Thanks