Interface IToolBar
A .NET Windows Forms toolbar.
Inherited Members
Namespace: HP.LFT.SDK.WinForms
Assembly: HP.LFT.SDK.dll
Syntax
public interface IToolBar : IUiObjectBase, IUiObjectBase, IClickable, IDoubleClickable, ILocationInfoProvider, ISupportSendKeys, ISupportDragAndDrop, IEnabledProvider, IVisibleProvider, ISupportsNativeObject, ITestObject, ITestObjectDescriber
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.
Declaration
string ErrorText { get; }
Property Value
| Type | Description |
|---|---|
| string |
Items
Returns the toolbar items in this toolbar. Do not invoke on a menu.
Declaration
ReadOnlyCollection<IToolBarItem> Items { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyCollection<IToolBarItem> |
SelectedItems
Returns the selected items in this toolbar. Do not invoke on a menu.
Declaration
ReadOnlyCollection<IToolBarItem> SelectedItems { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyCollection<IToolBarItem> |
TopMenuItems
For menu: returns the names of the top menu items.
For toolbar: returns the names of the toolbar buttons.
Declaration
ReadOnlyCollection<string> TopMenuItems { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyCollection<string> |
Methods
GetItem(string)
Retrieves the item with the specified text.
Declaration
IToolBarItem GetItem(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The text. |
Returns
| Type | Description |
|---|---|
| IToolBarItem |
IsItemExists(string)
Indicates whether the specified toolbar button or menu button exists.
Declaration
bool IsItemExists(string itemPath)
Parameters
| Type | Name | Description |
|---|---|---|
| string | itemPath | The full path of the button. The full path of a menu button is a list of menu button names separated by semicolons. |
Returns
| Type | Description |
|---|---|
| bool |
Select(string)
Selects the specified item in this menu. Do not invoke on a toolbar.
Declaration
void Select(string itemPath)
Parameters
| Type | Name | Description |
|---|---|---|
| string | itemPath | The full path of the menu item is a list of |
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.
Declaration
void ShowDropdown(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The 0-based index of the button. |
ShowDropdown(string)
Opens the dropdown menu associated with this menu item or toolbar item.
Declaration
void ShowDropdown(string itemPath)
Parameters
| Type | Name | Description |
|---|---|---|
| string | itemPath | The full path of the item. The full path of a menu item is a list of menu item names separated by semicolons. |