Menu for Display

Hi
All number fields have a format option to limit the number of digits which are displayed.

See here: Google Code Archive - Long-term storage for Google Code Project Hosting.

The relevant part is this:
Format Options
c: Number of digits, e.g. "c2" allows numbers between "00" and "99". Note, that this setting must fit to the min and max value.

This means you get the following results

M2_U8NUM(el,"c3",0,255,&number) --> "[000]"
M2_U8NUM(el,"c2",0,31,&number) --> "[00]"
M2_U8NUM(el,"c1",0,9,&number) --> "[0]"

The "c" format option is the key to format the output.
For your xy-grid you need to combine everything:
M2_U8NUM(el,"x0y1c2",0,31,&number) --> "[00]" at position (0,1)

Hope this helps,
Oliver

Edit: Added "code" section