Skip to content

ObLabelComboBox Class

Mauricio Jorquera edited this page Feb 10, 2026 · 6 revisions

Description

Namespace: SCADtools.Revit.UI.OptionsBar

This class is used to add an element that combines a Label with a ComboBox to the options bar.

Example

The following example creates a ObLabelComboBox.

C#

List<ComboBoxItemText> comboBoxItemsText = new List<ComboBoxItemText>()
{
    new ComboBoxItemText() { ItemText = "8" },
    new ComboBoxItemText() { ItemText = "10" },
    new ComboBoxItemText() { ItemText = "12" },
    new ComboBoxItemText() { ItemText = "16" }
};
ObLabelComboBox labelComboBox = new ObLabelComboBox("Diameter:")
{
    ItemsText = comboBoxItemsText,
    MarginLeft = 10,
    ControlWidth = 52,
    ObExpandedToolTip = new ObExpandedToolTip()
    {
        Title = "Bar Diameter",
        Content = "Specifies the bar diameter.",
    }
};

Constructors

Name Description
ObLabelComboBox() Initializes a new instance of the ObLabelComboBox class.
ObLabelComboBox(string label) Initializes a new instance of the ObLabelComboBox class.

Properties

Name Description
ControlWidth Gets or sets the width of the ComboBox.
ObExpandedToolTip This class implements the standard tooltip.
ItemsText Gets or sets a collection used to generate the content of the ObLabelComboBox.
Label The user-visible text on the Label.
MarginLeft Gets or sets the separation of the Control with some control that is to its left.
ShowLabel Gets or sets the value indicating whether the label text is visible.
SelectedIndex Gets or sets the index of the selected item.
SelectedItem Gets or sets the currently selected item.

Clone this wiki locally