Notifications
Clear all

[Closed] Spinner Needs More Decimal Places?

I need to do some work with really small values, and I am trying to give the user of the script more control. The spinners only take values down to 0.001 I would like to go one or two decimal places smaller in the spinner. i.e. 0.0001 or 0.00001 is there any way to get a spinner to respect use more decimal spaces… I know they are there just not displayed. For example 0.0001 shows up in the spinner as 0.0


global Tester1
try (destroyDialog Tester1) catch()
(
rollout Tester1 "Tester1" height:80 width:160
(
 spinner spnMin "Default  0.001:" pos:[12,8] width:140 height:16 range:[0.0,100000.0,0.001] scale:0.001 type:#worldunits
 spinner spnSM "Default 0.0001:" pos:[12,30] width:140 height:16 range:[0.0,100000.0,0.0001] scale:0.0001 type:#worldunits
 button btnVal001 "Val 0.001" pos:[8,54] width:64 height:24
 button btnVal0001 "Val 0.0001" pos:[80,54] width:64 height:24
 
 on btnVal001 pressed do 
 (
  --print spnSM.value
  StrMin = spnMin.value as string
  messagebox strMin
 )
 
 on btnVal0001 pressed do 
 (
  --print spnSM.value
  StrSM = spnSM.value as string
  messagebox strSM
 )
 
)
createdialog Tester1
)

 

I think my next best way to give the user more control is to use an editText box and convet text to a number…

Any ideas would be greatly appreciated. Thanks!

2 Replies

it’s a preference setting

Customize::Preferences… General::Spinners::Precision

Dohhh. I knew that at one point… Thanks a bunch!