-
Notifications
You must be signed in to change notification settings - Fork 1
ComboBoxItemText Class
Mauricio Jorquera edited this page Nov 14, 2023
·
10 revisions
Namespace: SCADtools.Revit.UI
This class represents an item within the LabelComboBox class and has two properties: ItemTitle and ItemText.
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" }
};
LabelComboBox labelComboBox = new LabelComboBox()
{
ShowLabel = false,
ItemsText = comboBoxItemTexts
};
Name | Description |
---|---|
ItemTitle | Gets or sets a title for the selected item to be displayed when the combobox is collapsed. |
ItemText | Gets or sets the text associated with the selected item, which will be displayed in the expanded list when the combobox is dropped down. |
If the user does not want to display text in the ItemTitle property, they can leave it unassigned or set its value to empty.