Page 1 of 1

Numberformat Field

Posted: Sat Jun 06, 2009 5:46 pm
by Daross
Hi all
I'm trying to convert my spreadsheet programs to Revolution.
I have a problem to setting numberformat into field "results" (I need format #.##0;-#.##0 the same in the spreadsheet)
My Rev stack is composed as follows: field "a" - field "b" - field "results"-
button "Enter"

Code: Select all

[b]Button "Enter"[/b]
on mouse up
put fld "a" * fld "b" into fld "results"
end mouseup

[code] [b]field "results"[/b]
on field
set numberformat to me to "#.##0;-#.##0"
end field
where is the 'error?

Posted: Sat Jun 06, 2009 6:19 pm
by Klaus
Buona sera Daross,

"the numberformat" is not a property of a field, but a local (script) property.

You need to set it before you do your computing:

Code: Select all

on mouse up 
  set the numberformat to "#.###"
  put fld "a" * fld "b" into fld "results" 
end mouseup 
Check "numberformat" in the docs and see also "format".


Best

Klaus

Posted: Sat Jun 06, 2009 8:33 pm
by Daross
Hi Klaus,
your script works!
Very very thanks!
________________
Ciao
Davide