Share your advanced knowledge/code with the community.
Posts: 8
Joined: Thu Sep 14, 2017 12:59 pm

Formatting the SpinGadget

by MarkOtt Fri Sep 22, 2017 10:06 am

If displaying a year like 1963 in a SpinGadget it is formatted by default as 1.963 using a point as thousand separator what is not so nice for a year number.

The display of a SpinGadget can be formatted as follows by manipulating the "constraints" attributes:
Code: Select all
SpinGadget(#SpinGadgetYear, 70, 70, 100, 24, 1900, 9999, #PB_Spin_Numeric)

SpinGadgetId = GadgetID(#SpinGadgetYear)
! dijit.byId('constraints').places = 0;
! dijit.byId('constraints').pattern = '#';

; For values of "places" and "pattern" see at:

Best regards. Markus
Return to Tricks 'n' Tips

Who is online

Users browsing this forum: No registered users and 1 guest