Good afternoon to all,
in TTMSFNCProgressBar the value type are pvtValue or pvtPercentage.
Sometime i need to show another "value" as string. For example the progress bar shows how time remain before some procedure ends. In this case the value properties increase the "progress" but while the progress's increment ... the remain time (as opposite) decrement.
There is this possibiliy in order to customize the value ?
Hi Pieter,
thanks for reply.
You have rigth .... In this way the i can show a customize string.
Anyway this way fire up others "unwanted" behaviors.
For example:
This line write customize string according to ARect. But ARect is calculated to the component value property so, if the target is centered text, the result is not the wanted one.
Also is possible to change the start point as ARect.Left - 50 (or calculate the real center position according to string's length), in this case the text is where must be but, if are in use two fonts (one for normal show and one when text is "cover" by the progress bar) in order to get 2 color string what happend is that when the progress bar cover the text, it will be hide until the progress bar arrives to the "change color point" calculated according to component value tring. Over that point the string switch with two color.
It's possible who i miss other functions in order to get this result.
In my opinion, could be a nice feature add something like:
if FLayout.ValueType = pvtValue then
begin
s := FLayout.Prefix + FloatToStrF(val, FLayout.TextFormat , 8 + FLayout.Decimals, FLayout.Decimals) + FLayout.Suffix;
end
else
if FLayout.ValueType = pvtPercentage then
begin
s := FloatToStrF(perc, FLayout.TextFormat, 2 + FLayout.Decimals, FLayout.Decimals) + '%';
end
else
s:=CustomString;
Where CustomString is a published string property.