Class ColorListBox
public class ColorListBox : VirtualListBox, IBaseObjectWithId, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, INotifyDataErrorInfo, IReadOnlyStrings, IListControlItemContainer, IListControlItemDefaults, ICheckListBox<ListControlItem>, ICustomListBox<ListControlItem>, IListControl<ListControlItem>, IListControl, IControl, IDisposable, IWin32Window
- Inheritance
-
ColorListBox
- Implements
Remarks
Items in this control have ListControlItem type where Value is Color and Text is label of the color.
Constructors
- ColorListBox()
Initializes a new instance of the ColorListBox class.
- ColorListBox(Control)
Initializes a new instance of the ColorListBox class.
- ColorListBox(bool)
Initializes a new instance of the ColorListBox class.
Fields
- InitColors
Gets or sets method that initializes items in ColorListBox.
- Painter
Gets or sets default painter for the ColorListBox items.
Properties
- DisabledImageColor
Gets or sets disabled image color.
- 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.
- GetItemValueOrDefault(IListControl, int, Color)
Gets color value of the specified item or default color.
- InitDefaultColors(ColorListBox)
Adds color items to the ColorListBox. This is default implementation of the initialization method. It is assigned to InitColors property by default.
- Initialize(bool)
Initializes control with default colors and assigns item painter. This method is called from constructor.