Table of Contents

Class ComboBoxAndLabel

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

Implements ComboBox with attached Label.

[ControlCategory("Editors")]
public class ComboBoxAndLabel : ControlAndLabel, IBaseObject, IDisposableObject, 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(string)

Initializes a new instance of the ComboBoxAndLabel class.

Properties

ComboBox

Gets main child control, same as MainControl.

IsEditable

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

Items

Gets the items of the ListControl.

MainControl

Gets main child control.

SelectedIndex

Gets or sets the index specifying the currently selected item.

SelectedItem

Gets or sets currently selected item in the combo box.

Methods

BindHandlerEvents()

Binds events to the handler.

CreateControl()

Creates main child control.