Enum values pills property

Enumerated domains are usually good candidates to be shown using pills. A different pill for each value may help the application user to focus on those that require more attention.

The Enum values pills property lets the developer specify what pill, if any, to show for each enumeration value.

EnumValuesPillsEditor
Enum values pills editor

The editor shows the values currently present in the domain so that the developer can define the pill for each case. Values out of this list are shown using default values.

By default, pills are shown using the "K2BT_PillDefault" class and its text equal to the enumerated value's description.

When this property is set, K2BTools generates a procedure that receives a variable based on the domain and returns a collection of pills that always has one element only. The procedure is placed in the same module as the domain itself, inside a folder called Domain Pill Providers. The procedure is overwritten if necessary each time the domain is modified, manual edits are lost.

Configuring this property also impacts existing and future K2BTools instances: wherever an attribute or variable based on the domain is shown, the procedure will be used as pill provider and the "Show pills only" property will be set to "True" by default. The developer can override these default values as needed.

The list of available classes is controled by Available pill classes property.

Use the Show pills only property to control whether the actual domain value is shown or not.

See also: Attribute Pills, Conditional Pills property, Pill provider property, Show pills only property