-
Notifications
You must be signed in to change notification settings - Fork 1
ComboBoxItemText Class
Mauricio Jorquera edited this page Feb 10, 2026
·
12 revisions
Namespace: SCADtools.Revit.UI.OptionsBar
This class represents an item within the ObLabelComboBox 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 ObLabelComboBox object.
C#
ObservableCollection<ComboBoxItemText> comboBoxItemTexts = new ObservableCollection<ComboBoxItemText>(
new List<ComboBoxItemText>()
{
new ComboBoxItemText () { ItemTitle = "Type : ", ItemText = "B1a" },
new ComboBoxItemText () { ItemTitle = "Type : ", ItemText = "B1b" }
});
ObLabelComboBox labelComboBox = new ObLabelComboBox()
{
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.