1. Abhijit Patil
  2. PowerBuilder
  3. 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
user enters 1 -> 1.00
user enters 0 -> 10.00
user enters . -> 10.00(control is moves to right side of the decimal
user enters 2 -> 10.20
user enters 5 -> 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
user enters 1 -> 0.01
user enters 0 -> 0.10
user enters 2 -> 1.02 
user enters 5 -> 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?

Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 1 May 2018 15:16 PM UTC
  2. PowerBuilder
  3. # 1

Try the following:

ll_rc = dw_1.SelectText (1,0)

 

Olan

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.