- Abhijit Patil
- PowerBuilder
- Thursday, 26 April 2018 06:31 AM UTC
Hi,
In Powerbuilder we have a amount field with following properties -
Editmask set as #######.00
Format set as #,##0.00;-#,##0.00;0.00;''
By default when control reaches to this field and any amount entered is entered on the left of the decimal (.) in the sequence of unit, tens, hundreds ....
In order to enter the fractional amount on the right of the decimal (number of tenths (1/10's) , number of hundreds (1/100's) user needs to enter a decimal (.) and then the digits in the order of 1/10's and 1/100's.
e.g. User needs to enter amount as 10.25.
Initial value in the field - .00
1.00
10.00
10.00(control is moves to right side of the decimal
10.20
10.25
We have a requirement to change this behavior so that -
A user intending to enter a 10.25 amount would click in the amount field
Initial value in the field - .00 or empty
0.01
0.10
1.02
10.25
In this case user don't have to explicitly enter decimal (.) and by default cursor should always remain at the right end of the amount field. Anything entered shifts left from the extreme right end.
We tried to use combination of edimask and format expressions but not able to get the desired result.
With decimal field, how can we always keep the cursor at the right end and whatever entered will start shifting the entered digits to left?
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.