Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link Par2: Working with 2 or 4 Decimal Places 2003-11-18 -- Ray Goudie In your dictionary file defintion, use the four decimal places for all
monetary fields, as required by spec. Ensure that every such monetary field
has a constant picture, say, "@n14.4".
In your config file, have a byte that determines how many decimnal digits a
particular customer wants to use. Then, in the Init method of your form
windows, just after opening the window, you loop through all the fields and
if the fields picture is equal to "@n14.4", you replace the picture with the
appropriate picture according to the user's preference:
---
currentField = 0
loop
currentField = window{PROP:NextField, currentField}
if currentField = 0
break
end
if (currentField{PROP:Type} = CREATE:Entry) and |
(currentField{PROP:Text} = '@n14.4')
case decimalPlaces
of 2
currentField{PROP:Text} = '@n12.2'
of 3
currentField{PROP:Text} = '@n13.3'
end
end
end
---
I feel that there may be more effective methods, but none come to mind at
this time.
Today is November 21, 2024, 7:05 am This article has been viewed 35217 times.
|
|