Skip to content

LabelComboBox Class

Mauricio Jorquera edited this page Nov 14, 2023 · 11 revisions

Description

Namespace: SCADtools.Revit.UI

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

Example

The following example creates a LabelComboBox.

C#

List<ComboBoxItemText> comboBoxItemTexts = new List<ComboBoxItemText>()
{
    new ComboBoxItemText() { ItemText = "8" },
    new ComboBoxItemText() { ItemText = "10" },
    new ComboBoxItemText() { ItemText = "12" },
    new ComboBoxItemText() { ItemText = "16" }
};
//Initialize a LabelComboBox to display a list of diameters
LabelComboBox labelComboBox = new LabelComboBox()
{
    Label = "Diameter:",
    ItemsText = comboBoxItemTexts,
    MarginLeft = 10,
    ComboBoxWidth = 52,
    ControlToolTip = new ControlToolTip()
    {
        Title = "Bar Diameter",
        Content = "Specifies the bar diameter.",
    }
};

Constructors

Name Description
LabelComboBox() Initializes a new instance of the LabelComboBox class.

Properties

Name Description
Label The user-visible text on the Label.
ShowLabel Gets or sets whether the CheckBox is checked.
ComboBoxWidth Gets or sets whether the CheckBox is checked.
ItemsText Gets or sets whether the CheckBox is checked.
SelectedIndex Gets or sets whether the CheckBox is checked.
ControlToolTip This class implements the standard tooltip.
MarginLeft Gets or sets the separation of the Control with some control that is to its left.
ComboBoxControl Represents a native ComboBox class.

Clone this wiki locally