ReMEn wrote:
Didn't find much documentation on value formatting on a NumericUpDown
control. is it possible to separate numbers by a special character.
For example, If I wanted to display an option to change a person's height in
a NumericUpDown, I would not want them to see 62, I'd want them to see 6'2"
(6-Foot-Two).
Is this even possible?
Thankyou,
You can make a hiden link.
I mean, you have for example IDC_ED_FEET and IDC_SPIN_FEET linked now,
put one more editbox IDC_ED_FEETINT hidden (unvisible) in the window,
and make a link with IDC_SPIN_FEET. By pussing updown button, it will
actually change the content of IDC_ED_FEETINT, from 61 to 62, then
you capture the EN_CHANGE an update your IDC_ED_FEET to 6'2".
When user edited the string 6'2" to something else, you react to
EN_CHANGE and parse the new value and set the IDC_ED_FEETINT.
I don't know what to do if user edited to be "foobaa" instead of valid
height, then you may change the value to be 0.
Don't forget to make a semafor flag to distinguish user's input or
program code which changed the editbox, to avoid recursive EN_CHANGE events...
muchan