Class ColorComboBox
public class ColorComboBox : ComboBox, IBaseObjectWithId, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, INotifyDataErrorInfo, IReadOnlyStrings, IListControl<object>, IListControl, IControl, IDisposable, IWin32Window, IListControlItemContainer
- 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
- DefaultDisabledImageColor
Gets or sets default disabled image color.
- InitColors
Gets or sets default method that initializes items in ColorComboBox.
- PaintColorImage
Gets or sets method that paints color image in the item. Borders around color image are also painted by this method.
- 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.
- DefaultCreateItem(Color, string?)
Default method of the item creation for the specified color and title.
- Find(Color?)
Finds item with the specified color.
- Find(Color?, IEnumerable)
Finds item with the specified color in the collection of the color items.
- 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.
- PaintDefaultColorImage(Graphics, RectD, Color)
Paints color image in the item with the default style. Borders around color image are also painted by this method. This is default value of the PaintColorImage field.