Reference for the Mosaic class WidgetSet::ValueDisplayConfig

WidgetSet::ValueDisplayConfig
FormatDecimalSign
FormatDigitGroupSign
FormatMinusSign
FormatPlusSign
Layout
UnitAlignment
UnitColorNegative
UnitColorPositive
UnitFont
UnitMarginBottom
UnitMarginLeft
UnitMarginRight
UnitMarginTop
ValueAlignment
ValueColorNegative
ValueColorPositive
ValueFont
ValueMarginBottom
ValueMarginLeft
ValueMarginRight
ValueMarginTop
WidgetMaxSize
WidgetMinSize
WidgetSet::WidgetConfig

SEE ALSO

Using and customizing the Value Display widget.

This class implements the functionality permitting you to simply customize the look and feel of a 'value display' widget (WidgetSet::ValueDisplay). In the practice, you will create an instance of this class, configure its properties with fonts, colors and other relevant attributes according to your design expectations and assign such prepared configuration object to the property 'Appearance' of every affected value display widget. Thereupon the widgets will use the configuration information provided in the object.

During its lifetime the value display widget remains always in one of the both states: 'positive' or 'negative'. The state 'positive' is true if the value displayed in the widget is greater than or equal to 0 (zero). The state 'negative' is true, if the value is less than 0 (zero). With the configuration object you can specify the appearance of the value display widget for every state individually. For this purpose you should know from which views the widget is composed of:

Per default the both views 'Value' and 'Unit' are arranged within the widget area independently. With the property Layout you can specify other modes to e.g. arrange the unit to appear appended at the right edge of the displayed value; etc.

The configuration object provides various properties to localize the format operation how the number is presented. In particular, with the properties FormatDecimalSign and FormatDigitGroupSign you can specify the signs or strings to be used as decimal separator sign and digit group sign. With the properties FormatMinusSign and FormatPlusSign you can determine which signs or strings should appear to sign positive or negative numbers.

With the properties WidgetMinSize and WidgetMaxSize you can configure size constraints for the widget itself. You can, for example, limit the value display widget to not shrink below a specified width or height.

property string FormatDecimalSign = ".";

The property 'FormatDecimalSign' determines the string to use to separate the integer and decimal part of the displayed value. If this property is initialized with an empty string "", no separator signs are shown.

property string FormatDigitGroupSign = "";

The property 'FormatDigitGroupSign' determines the string to separate every 3 digits of the integer part of the displayed value. If this property is initialized with an empty string "", no separator signs are shown.

property string FormatMinusSign = "-";

The property 'FormatMinusSign' determines the string to prefix the displayed value if the value is less than 0 (zero). If this property is initialized with an empty string "", no signs are shown in front of a negative number.

property string FormatPlusSign = "";

The property 'FormatPlusSign' determines the string to prefix the displayed value if the value is greater than or equal to 0 (zero). If this property is initialized with an empty string "", no signs are shown in front of a positive number.

property WidgetSet::ValueDisplayLayout Layout = WidgetSet::ValueDisplayLayout.UnitAndValueAreIndependent;

The property 'Layout' determines whether and how the both text views (value and unit) should be arranged within the area of the widget. Following options exist:

property Views::TextAlignment UnitAlignment = Views::TextAlignment[AlignHorzCenter, AlignVertCenter];

The property 'UnitAlignment' determines how the text specified in the property 'Unit' of the value display widget should be aligned.

Per default, the text is aligned within the entire widget area. By using the properties UnitMarginLeft, UnitMarginRight, UnitMarginTop and UnitMarginBottom you can limit the area as desired.

property color UnitColorNegative = #000000FF;

The property 'UnitColorNegative' determines the color value to display the text specified in the property 'Unit' if the actually displayed value is less than 0 (zero).

property color UnitColorPositive = #000000FF;

The property 'UnitColorPositive' determines the color value to display the text specified in the property 'Unit' if the actually displayed value is greater than or equal to 0 (zero).

property Resources::Font UnitFont = null;

The property 'UnitFont' determines the font object used to print the text specified in the property 'Unit' of the value display widget. If no font is specified (the property is 'null'), no text is displayed.

property int32 UnitMarginBottom = 0;

The property 'UnitMarginBottom' determines the gap below the area destined to display the unit text relative to the bottom edge of the widget itself.

property int32 UnitMarginLeft = 0;

The property 'UnitMarginLeft' determines the gap on the left of the area destined to display the unit text relative to the left edge of the widget itself.

Please note, if Layout is configured with 'AlignUnitRightToValue', the property 'UnitMarginLeft' determines the gap relative to the right end of the content displayed actually in the value view.

property int32 UnitMarginRight = 0;

The property 'UnitMarginRight' determines the gap on the right of the area destined to display the unit text relative to the right edge of the widget itself.

Please note, if Layout is configured with 'AlignUnitLeftToValue', the property 'UnitMarginRight' determines the gap relative to the left end of the content displayed actually in the value view.

property int32 UnitMarginTop = 0;

The property 'UnitMarginTop' determines the gap above the area destined to display the unit text relative to the top edge of the widget itself.

property Views::TextAlignment ValueAlignment = Views::TextAlignment[AlignHorzCenter, AlignVertCenter];

The property 'ValueAlignment' determines how the text showing the numerical value should be aligned.

Per default, the value is aligned within the entire widget area. By using the properties ValueMarginLeft, ValueMarginRight, ValueMarginTop and valueMarginBottom you can limit the area as desired.

property color ValueColorNegative = #000000FF;

The property 'ValueColorNegative' determines the color to display the numerical value if the value is less than 0 (zero).

property color ValueColorPositive = #000000FF;

The property 'ValueColorPositive' determines the color to display the numerical value if the value is greater than or equal to 0 (zero).

property Resources::Font ValueFont = null;

The property 'ValueFont' determines the font object used to print the text with the numerical value. If no font is specified (the property is 'null'), no text is displayed.

property int32 ValueMarginBottom = 0;

The property 'ValueMarginBottom' determines the gap below the area destined to display the value text relative to the bottom edge of the widget itself.

property int32 ValueMarginLeft = 0;

The property 'ValueMarginLeft' determines the gap on the left of the area destined to display the value text relative to the left edge of the widget itself.

Please note, if Layout is configured with 'AlignValueRightToUnit', the property 'ValueMarginLeft' determines the gap relative to the right end of the content displayed actually in the unit view.

property int32 ValueMarginRight = 0;

The property 'ValueMarginRight' determines the gap on the right of the area destined to display the value text relative to the right edge of the widget itself.

Please note, if Layout is configured with 'AlignValueLeftToUnit', the property 'ValueMarginRight' determines the gap relative to the left end of the content displayed actually in the unit view.

property int32 ValueMarginTop = 0;

The property 'ValueMarginTop' determines the gap above the area destined to display the value text relative to the top edge of the widget itself.

property point WidgetMaxSize = <0,0>;

The property 'WidgetMaxSize' determines the maximum allowed size of the widget. Accordingly, the value display widget can't become bigger than the value specified in this property. By using this property you can configure the size constraints for the widget.

property point WidgetMinSize = <0,0>;

The property 'WidgetMinSize' determines the minimal allowed size of the widget. Accordingly, the value display widget can't become smaller than the value specified in this property. By using this property you can configure the size constraints for the widget.