Interface IToolBar
A .NET Windows Forms toolbar.
public interface IToolBar : IUiObjectBase, IUiObjectBase, IClickable, IDoubleClickable, ILocationInfoProvider, ISupportSendKeys, ISupportDragAndDrop, IEnabledProvider, IVisibleProvider, ISupportsNativeObject, ITestObject, ITestObjectDescriber
- Inherited Members
- Extension Methods
Remarks
A .NET Windows Forms menu is also known as a ToolBar test object.
Properties
ErrorText
Returns the tooltip text of the error icon associated with this object.
string ErrorText { get; }
Property Value
Items
Returns the toolbar items in this toolbar. Do not invoke on a menu.
ReadOnlyCollection<IToolBarItem> Items { get; }
Property Value
SelectedItems
Returns the selected items in this toolbar. Do not invoke on a menu.
ReadOnlyCollection<IToolBarItem> SelectedItems { get; }
Property Value
TopMenuItems
For menu: returns the names of the top menu items.
For toolbar: returns the names of the toolbar buttons.
ReadOnlyCollection<string> TopMenuItems { get; }
Property Value
Methods
GetItem(string)
Retrieves the item with the specified text.
IToolBarItem GetItem(string text)
Parameters
textstringThe text.
Returns
IsItemExists(string)
Indicates whether the specified toolbar button or menu button exists.
bool IsItemExists(string itemPath)
Parameters
itemPathstringThe full path of the button. The full path of a menu button is a list of menu button names separated by semicolons.
Returns
Select(string)
Selects the specified item in this menu. Do not invoke on a toolbar.
void Select(string itemPath)
Parameters
itemPathstringThe full path of the menu item is a list of
menu button names separated by semicolons.
Remarks
Only visible items can be selected. You can use ShowDropdown(string) or ShowDropdown(int) to make the button visible.
ShowDropdown(int)
Opens the dropdown menu associated with this toolbar button. Do not invoke on a menu.
void ShowDropdown(int index)
Parameters
indexintThe 0-based index of the button.
ShowDropdown(string)
Opens the dropdown menu associated with this menu item or toolbar item.
void ShowDropdown(string itemPath)
Parameters
itemPathstringThe full path of the item. The full path of a menu item is a list of menu item names separated by semicolons.