I know this sounds like a stupid question. I looked thru the documentation and I couldn't figure out or find a good example.
I have a field where I am putting a value.
I want to set the numberFormat for that value to ^^^^.^^, that is four place holders, a decimal point, and two placeholders after that.
I have another field where I want the numberFormat to be ^^.^^^^
do I put that into a script for the field? how?
do I declare it at the beginning of the stack? how?
assistance is very much appreciated.
homer
setting "numberFormat" for a field?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 179
- Joined: Sat Apr 08, 2006 11:08 pm
- Contact:
Homer, I don't think you can set this as a property of a field.
One way to achieve it would be to have a 'dummy setProp' handler in the script of the field:
(that would be "%07.4f" for your other field)
Then, whenever you want to update that field, you'd do this:
Hope this helps,
Mark
One way to achieve it would be to have a 'dummy setProp' handler in the script of the field:
Code: Select all
setProp formatNumber pNumber
put format("%07.2f", pNumber) into me
end formatNumber
Then, whenever you want to update that field, you'd do this:
Code: Select all
set the formatNumber of fld "theField" to someNumber
Mark