Class ColorListProperty
- Namespace
- CADability.UserInterface
- Assembly
- CADability.dll
The entry of a single color in the property page display of a ColorList. The label shows the name of the color (editable unless the color is static), the value shows a color box; clicking on it opens the color dialog. The context menu ("MenuId.ColorListEntry") allows to delete the color, to make it the current color of the list, to change the color or to rename it. The entry of the current color is shown in bold.
public class ColorListProperty : PropertyEntryImpl, IPropertyEntry, IShowProperty, ICommandHandler
- Inheritance
-
ColorListProperty
- Implements
- Inherited Members
Constructors
ColorListProperty(ColorList, int)
Creates the entry for the color with the given index in ColorList.
public ColorListProperty(ColorList ColorList, int Index)
Parameters
Properties
ContextMenu
Must be overridden, when Flags contains PropertyEntryType.ContextMenu. See ContextMenu
public override MenuWithHandler[] ContextMenu { get; }
Property Value
Flags
Implementation of Flags: the derived class states what the entry is and what the user can do with it. The flags must match the overridden members, e.g. HasSubEntries requires SubItems, ValueEditable requires Value and EndEdit(bool, bool, string), DropDown requires GetDropDownList() and ListBoxSelected(int).
public override PropertyEntryType Flags { get; }
Property Value
LabelText
An explicit label text. When set (not null) it is shown instead of the text from the StringTable; use it for entries whose label is not a fixed resource string, e.g. the name of an item. Call Refresh() after changing it while the entry is displayed.
public override string LabelText { get; }
Property Value
Value
Must be overridden, when Flags contains PropertyEntryType.ValueEditable
public override string Value { get; }
Property Value
Methods
ButtonClicked(PropertyEntryButton)
Must be overridden, when Flags contains PropertyEntryType.HasSpinButton or CancelButton or OKButton
public override void ButtonClicked(PropertyEntryButton button)
Parameters
buttonPropertyEntryButton
EditTextChanged(string)
May be overridden when Flags contains PropertyEntryType.ValueEditable. See EditTextChanged(string),
public override bool EditTextChanged(string newValue)
Parameters
newValuestring
Returns
EndEdit(bool, bool, string)
Must be overridden when Flags contains PropertyEntryType.ValueEditable. See EndEdit(bool, bool, string)
public override void EndEdit(bool aborted, bool modified, string newValue)
Parameters
GetDropDownList()
Must be overridden when Flags contains PropertyEntryType.DropDown, See GetDropDownList()
public override string[] GetDropDownList()
Returns
- string[]
ListBoxSelected(int)
Must be overridden when Flags contains PropertyEntryType.DropDown
public override void ListBoxSelected(int selectedIndex)
Parameters
selectedIndexint