Skip to content

ComboBoxItemText Class

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

Description

Namespace: SCADtools.Revit.UI

This class represents an item within the LabelComboBox class and has two properties: ItemTitle and ItemText.

Example

The following example creates a list of bar types and assigns it to the ItemText property of the LabelComboBox object.

C#

List<ComboBoxItemText> comboBoxItemTexts = new List<ComboBoxItemText>()
{
    new ComboBoxItemText () { ItemTitle = "Type : ", ItemText = "B1a" },
    new ComboBoxItemText () { ItemTitle = "Type : ", ItemText = "B1b" }
};
LabelTextBox labelTextBox = new LabelTextBox()
{
    ShowLabel = false,
    ItemsText = comboBoxItemTexts
};

Properties

Name Description
ItemTitle Gets or sets a title for the selected item to be displayed when the combobox is collapsed.
ItemTitle Gets or sets the text associated with the selected item, which will be displayed in the expanded list when the combobox is dropped down.

Clone this wiki locally