Add wxFloatingPointValidator::SetFactor()

This allows displaying values in percents (or also currency units and
subunits, for example) without changing the actually stored value.
This commit is contained in:
Vadim Zeitlin
2018-01-25 19:30:39 +01:00
parent f836d430e9
commit b1e59a6d60
6 changed files with 75 additions and 11 deletions

View File

@@ -346,6 +346,19 @@ public:
constructor.
*/
void SetPrecision(unsigned precision);
/**
Set factor used for displaying the value.
The value associated with the validator is multiplied by the factor
before displaying it and divided by it when retrieving its value from
the control. By default, the @a factor is 1, so the actual value is not
affected by it, but it can be set to, for example, 100, to display the
value in percents while still storing it as absolute value.
@since 3.1.1
*/
void SetFactor(double factor);
};
/**