2023-07-17 11:34 PM
Hi,
I'm in the process of implementing a result screen which displays the result along with unit.
Since the digits are not the same I see a spacing issue between result and result unit.
Example : 11 cm , 22cm
and 99 cm
I cannot have a fixed x and y co ordinate for the result unit.
This is because when eleven is displayed the result shrinks and looks far away from the result unit.when its 22 the result almost touches the result unit.
Is there a way to move the result unit (wild card position) along with the result (wild card) x and y co ordinates.
So that the spacing between result and result unit remains the same for all digits?
Solved! Go to Solution.
2023-07-21 06:58 AM
Hi
You can use getWidth- function to get width of result and then setX or moveTo command to move unit text.
Like this:
unitText.moveTo(valueText.getX()+valueText.getWidth()+4,valueText.getY());
Br J.T
2023-07-21 06:58 AM
Hi
You can use getWidth- function to get width of result and then setX or moveTo command to move unit text.
Like this:
unitText.moveTo(valueText.getX()+valueText.getWidth()+4,valueText.getY());
Br J.T