Class CommandBarComboBox
Represents a combobox in a toolbar
Inherited Members
Namespace: ABB.Robotics.RobotStudio.Environment
Assembly: ABB.Robotics.RobotStudio.Environment.dll
Syntax
public class CommandBarComboBox : CommandBarControl
Constructors
CommandBarComboBox(String)
Creates a CommandBarComboBox with a specific ID.
Declaration
public CommandBarComboBox(string id)
Parameters
Type | Name | Description |
---|---|---|
String | id | Control ID |
Remarks
The ID can be null, which creates a combo box that will not be added
to the UIEnvironment.CommandBarControls collection.
If you secify an ID, prefix it with the name of your Add-In, to avoid conflicts.
See Also
Properties
Enabled
Gets or sets if the combobox is enabled.
Declaration
public bool Enabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
If the Items collection is empty, the combobox will always be disabled.
Items
Gets a collection of all items in the combo box
Declaration
public CommandBarComboBoxItemCollection Items { get; }
Property Value
Type | Description |
---|---|
CommandBarComboBoxItemCollection |
SelectedIndex
Gets or sets the selected item's index
Declaration
public int SelectedIndex { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
SelectedItem
Gets the selected item
Declaration
public CommandBarComboBoxItem SelectedItem { get; set; }
Property Value
Type | Description |
---|---|
CommandBarComboBoxItem |
Width
Gets or sets the width of the combo box
Declaration
public int Width { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
The width is defined in pixels at 100% screen scale, excluding the dropdown button. Set to 0 to automatically size the combo box to fit all items.
Methods
FromID(String)
Returns the CommandBarComboBox that has the specified ID, or null if none exists.
Declaration
public static CommandBarComboBox FromID(string id)
Parameters
Type | Name | Description |
---|---|---|
String | id | ID to find button for |
Returns
Type | Description |
---|---|
CommandBarComboBox | The CommandBarComboBox with the specified ID |
Remarks
This is the same as UIEnvironment.CommandBarControls[id] as CommandBarComboBox
Events
DropDown
Raised before the drop-down listbox is shown
Declaration
public event EventHandler DropDown
Event Type
Type | Description |
---|---|
EventHandler |
SelectionChanged
Raised when the selected item changes
Declaration
public event EventHandler SelectionChanged
Event Type
Type | Description |
---|---|
EventHandler |