For more than two values, the event structure even makes it possible to
actually use only a simple pict ring control.
Catching the "Mouse Down" event, you can use the control ref to update
the ring value (basically taking mod(currstate+1,nbstates)), update any
alternate type/value alias variable, and also discard the event to hide
the pop-up selection that will remain otherwise.
That's neat but the diagram size will grow along with the number of
these you want to use... - oz
Greg McKaskle a écrit:
>> I want to create a picture ring that behaves like a boolean control.
>> When clicked on, it shouldn't display a list of possible states, but
>> just skip to the next state. The scroll buttons shouldn't be used.
>>
>> How do I change the b
ehaviour of a control?
>
> Two ways. If you really have two states, then customize the Boolean
> button using the control editor as stated in the other post.
> If you have more than two states, then the Boolean shouldn't be the
> indicator, as it only has two values, but you can still use it as the
> control the user interacts with. Place a ring control on the panel,
> make it an indicator, and cover it with a Boolean button that you then
> make mostly or completely transparent. You may also want to select
> and group them together. On the diagram you can read the button value
> changes using either polling or events (with 6.1), and you can update
> the value of the ring to the appropriate state.
> Greg McKaskle