> > I have a simple question. I have to create digital control, where the
> > possible entry values are determined, and are not going in equal
> > increment. Simply saying the values which show up to the user , when he
> > clicks on the digital control window arrows are as follows: 1, 2, 5, 10,
> > 20, 40, 60. Is there any way to do it with digital control window? I
> > know, I can do it with listbox, but I need it to be done with digital
> > control window.
> > thanks in advance,
> > chris
>
> Chris,
> there is not a simple way to accomplish this. There
> is a hard way using a local variable and some serious
> logic but I do not think you would like the results.
>
> Is there some reason you can not use a ring control ?
> This would be much easier to use an
d you can recover
> the values by indexing the string array attribute node
> and a sting to decimal function.
Actually, since one of the rings looks just like a numeric, you can
just let the user increment and decrement a ring with the string "1",
"2", "5", ..., then the user will see a control that lets them do the
right things along with selecting from a menu. You can then use the
ring value to index an array of constants that match the strings.
You can also use an enum if you would like instead of a ring. The
other approach would be to use a numeric indicator and Boolean buttons
near the indicator to let you increment and decrement. You can use
the control editor to borrow the images from a real numeric's increment
and decrement buttons.
Greg McKaskle