Class ExToolStripComboBox
- Namespace
- ExControls
- Assembly
- ExControls.dll
ToolStrip item hosting an ExComboBox.
[ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ToolStrip|ToolStripItemDesignerAvailability.MenuStrip|ToolStripItemDesignerAvailability.ContextMenuStrip)]
public class ExToolStripComboBox : ToolStripControlHost, IBindableComponent, IDropTarget, IComponent, IDisposable, IThemeable
- Inheritance
-
ExToolStripComboBox
- Implements
- Inherited Members
Constructors
ExToolStripComboBox()
Initializes a new instance of the ExToolStripComboBox class hosting a new ExComboBox.
public ExToolStripComboBox()
Properties
AutoCompleteCustomSource
Gets or sets the custom string collection to use when the AutoCompleteSource property is set to CustomSource.
[Browsable(true)]
public AutoCompleteStringCollection AutoCompleteCustomSource { get; set; }
Property Value
- AutoCompleteStringCollection
An AutoCompleteStringCollection that contains the strings.
AutoCompleteMode
Gets or sets a value that indicates the text completion behavior of the ToolStripComboBox.
[Browsable(true)]
public AutoCompleteMode AutoCompleteMode { get; set; }
Property Value
- AutoCompleteMode
One of the AutoCompleteMode values. The default is None.
AutoCompleteSource
Gets or sets the source of complete strings used for automatic completion.
[Browsable(true)]
public AutoCompleteSource AutoCompleteSource { get; set; }
Property Value
- AutoCompleteSource
One of the AutoCompleteSource values. The default is None.
ComboBox
Gets the hosted ExComboBox.
[Browsable(true)]
public ExComboBox ComboBox { get; }
Property Value
DropDownHeight
Gets or sets the height, in pixels, of the drop-down portion box of a ToolStripComboBox.
[Browsable(true)]
public int DropDownHeight { get; set; }
Property Value
- int
The height, in pixels, of the drop-down box.
DropDownStyle
Gets or sets a value specifying the style of the ToolStripComboBox.
public ComboBoxStyle DropDownStyle { get; set; }
Property Value
- ComboBoxStyle
One of the ComboBoxStyle values. The default is DropDown.
DropDownWidth
Gets or sets the width, in pixels, of the drop-down portion of a ToolStripComboBox.
public int DropDownWidth { get; set; }
Property Value
- int
The width, in pixels, of the drop-down box.
DroppedDown
Gets or sets a value indicating whether the ToolStripComboBox currently displays its drop-down portion.
[Browsable(false)]
public bool DroppedDown { get; set; }
Property Value
- bool
true if the ToolStripComboBox currently displays its drop-down portion; otherwise, false.
FlatStyle
Gets or sets the appearance of the ToolStripComboBox.
public FlatStyle FlatStyle { get; set; }
Property Value
- FlatStyle
One of the values of FlatStyle. The options are Flat, Popup, Standard, and System. The default is Popup.
IntegralHeight
Gets or sets a value indicating whether the ToolStripComboBox should resize to avoid showing partial items.
public bool IntegralHeight { get; set; }
Property Value
- bool
true if the list portion can contain only complete items; otherwise, false. The default is true.
Items
Gets a collection of the items contained in this ToolStripComboBox.
public ComboBox.ObjectCollection Items { get; }
Property Value
- ComboBox.ObjectCollection
A collection of items.
MaxDropDownItems
Gets or sets the maximum number of items to be shown in the drop-down portion of the ToolStripComboBox.
public int MaxDropDownItems { get; set; }
Property Value
- int
The maximum number of items in the drop-down portion. The minimum for this property is 1 and the maximum is 100.
MaxLength
Gets or sets the maximum number of characters allowed in the editable portion of a combo box.
public int MaxLength { get; set; }
Property Value
- int
The maximum number of characters the user can enter. Values of less than zero are reset to zero, which is the default value.
SelectedIndex
Gets or sets the index specifying the currently selected item.
[Browsable(false)]
public int SelectedIndex { get; set; }
Property Value
- int
A zero-based index of the currently selected item. A value of negative one (-1) is returned if no item is selected.
SelectedItem
Gets or sets currently selected item in the ToolStripComboBox.
[Browsable(false)]
[Bindable(true)]
public object? SelectedItem { get; set; }
Property Value
- object
The object that is the currently selected item or null if there is no currently selected item.
SelectedText
Gets or sets the text that is selected in the editable portion of a ToolStripComboBox.
[Browsable(false)]
public string SelectedText { get; set; }
Property Value
- string
A string that represents the currently selected text in the combo box. If DropDownStyle is set to
DropDownList, the return value is an empty string ("").
SelectionLength
Gets or sets the number of characters selected in the editable portion of the ToolStripComboBox.
[Browsable(false)]
public int SelectionLength { get; set; }
Property Value
- int
The number of characters selected in the ToolStripComboBox.
SelectionStart
Gets or sets the starting index of text selected in the ToolStripComboBox.
[Browsable(false)]
public int SelectionStart { get; set; }
Property Value
- int
The zero-based index of the first character in the string of the current text selection.
Sorted
Gets or sets a value indicating whether the items in the ToolStripComboBox are sorted.
public bool Sorted { get; set; }
Property Value
Methods
ApplyTheme(ExTheme)
Sets the colors and appearance of the control by the theme.
public void ApplyTheme(ExTheme theme)
Parameters
themeExTheme
Events
DropDown
Occurs when the drop-down portion of a ToolStripComboBox is shown.
public event EventHandler DropDown
Event Type
DropDownClosed
Occurs when the drop-down portion of the ToolStripComboBox has closed.
public event EventHandler DropDownClosed
Event Type
DropDownStyleChanged
Occurs when the DropDownStyle property has changed.
public event EventHandler DropDownStyleChanged
Event Type
SelectedIndexChanged
Occurs when the value of the SelectedIndex property has changed.
public event EventHandler SelectedIndexChanged
Event Type
TextUpdate
Occurs when the ToolStripComboBox text has changed.
public event EventHandler TextUpdate