Table of Contents

Class ComboBoxAndLabel

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Implements ComboBox with attached label.

[ControlCategory("Editors")]
public class ComboBoxAndLabel : ControlAndLabel<ComboBox, Label>, IBaseObjectWithId, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, IControlAndLabel, INotifyDataErrorInfo
Inheritance
ComboBoxAndLabel
Implements

Examples

Here is how to declare a ComboBoxAndLabel in UIXML:

<ComboBoxAndLabel Text="some value" Title="Short Label" Margin="5" Name="control1"/>

Also, a ComboBoxAndLabel can be created from code:

ComboBoxAndLabel control = new();
control.Margin = 5;
control.ComboBox.IsEditable = false;
control.ComboBox.Items.Add("Value 1");
control.ComboBox.Items.Add("Value 2");
control.ComboBox.Items.Add("Value 3");
control.Title = "This is very long label";
control.ComboBox.SelectedItem = "Value 2";
control.Parent = mainPanel;

Remarks

Example of how a ComboBoxAndLabel can look:

ComboBoxAndLabel

Constructors

ComboBoxAndLabel()

Initializes a new instance of the ComboBoxAndLabel class.

ComboBoxAndLabel(Control)

Initializes a new instance of the ComboBoxAndLabel class.

ComboBoxAndLabel(string)

Initializes a new instance of the ComboBoxAndLabel class.

Properties

ComboBox

Gets inner ComboBox control.

HasInnerBorder

Gets or sets whether main inner control has border.

IsEditable

Gets or a value that enables or disables editing of the text in text box area of the ComboBox.

Items

Gets or sets the items of the control.

SelectedIndex

Gets or sets the index specifying the currently selected item.

SelectedItem

Gets or sets currently selected item in the combo box.

Events

SelectedIndexChanged

Occurs when SelectedIndexChanged event of the attached combobox control is changed.