Class ColorComboBox
public class ColorComboBox : ComboBox, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, INotifyDataErrorInfo, IListControl, IListControlItemContainer, IReadOnlyStrings, IListControl<object>, IControl, IDisposable, IWin32Window, ILayoutItem
- Inheritance
-
ColorComboBox
- Implements
Remarks
Items in this control have ListControlItem type where Value is Color and Text is label of the color.
Constructors
- ColorComboBox()
Initializes a new instance of the ColorComboBox class.
- ColorComboBox(Control)
Initializes a new instance of the ColorComboBox class.
- ColorComboBox(bool)
Initializes a new instance of the ColorComboBox class.
Fields
- InitColors
Gets or sets default method that initializes items in ColorComboBox.
- Painter
Gets or sets default painter for the ColorComboBox items.
Properties
- DisabledImageColor
Gets or sets disabled image color.
- IsEditable
Gets or a value that enables or disables editing of the text in text box area of the ComboBox.
- UseDisabledImageColor
Gets or sets whether to use DisabledImageColor for painting of the color image when control is disabled.
- Value
Gets or sets the selected color. Color value must be added to the list of colors before selecting it.
Methods
- AddColor(Color, string?)
Adds color to the list of colors.
- AddColors(KnownColorCategory[]?, bool)
Adds colors from the specified color categories.
- CreateItem(Color?, string?)
Creates item for the specified color and title.
- Find(Color?)
Finds item with the specified color.
- FindOrAdd(Color, string?)
Finds item with the specified color or adds it.
- InitDefaultColors(ColorComboBox)
Adds color items to the ColorComboBox. This is default implementation of the initialization method. It is assigned to InitColors property by default.
- Initialize(bool)
Performs default initialization of the colors list and assigns item painter.