Show / Hide Table of Contents

Class CommandBarComboBox

Represents a combobox in a toolbar

Inheritance
object
CommandBarControl
CommandBarComboBox
Inherited Members
CommandBarControl.ToString()
CommandBarControl.ResolveTarget(IEnumerable<Delegate>)
CommandBarControl.Id
CommandBarControl.Caption
CommandBarControl.Image
CommandBarControl.ImagePlacement
CommandBarControl.LargeImage
CommandBarControl.Tag
CommandBarControl.HelpText
CommandBarControl.ScreenTipImage
CommandBarControl.HelpId
CommandBarControl.Visible
CommandBarControl.IsUndoable
CommandBarControl.ThemedImage
CommandBarControl.LargeThemedImage
CommandBarControl.TrackCommandBarControl
Namespace: ABB.Robotics.RobotStudio.Environment
Assembly: ABB.Robotics.RobotStudio.Environment.dll
Syntax
public class CommandBarComboBox : CommandBarControl

Constructors

View Source

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
CommandBarControl

Properties

View Source

Enabled

Gets or sets if the combobox is enabled.

Declaration
public bool Enabled { get; set; }
Property Value
Type Description
bool
Remarks

If the Items collection is empty, the combobox will always be disabled.

View Source

Items

Gets a collection of all items in the combo box

Declaration
public CommandBarComboBoxItemCollection Items { get; }
Property Value
Type Description
CommandBarComboBoxItemCollection
View Source

SelectedIndex

Gets or sets the selected item's index

Declaration
public int SelectedIndex { get; set; }
Property Value
Type Description
int
View Source

SelectedItem

Gets the selected item

Declaration
public CommandBarComboBoxItem SelectedItem { get; set; }
Property Value
Type Description
CommandBarComboBoxItem
View Source

Width

Gets or sets the width of the combo box

Declaration
public int Width { get; set; }
Property Value
Type Description
int
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

View Source

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

View Source

DropDown

Raised before the drop-down listbox is shown

Declaration
public event EventHandler DropDown
Event Type
Type Description
EventHandler
View Source

SelectionChanged

Raised when the selected item changes

Declaration
public event EventHandler SelectionChanged
Event Type
Type Description
EventHandler
  • View Source
In this article
Back to top Copyright © 2025 ABB