Re: CW_BGROUP [message #21729] |
Mon, 18 September 2000 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Christophe Marque (Christophe.Marque@obspm.fr) writes:
> I have written a small test widget program:
> There is a CW_BGROUP area with 3 exclusive buttons: A B C
> When I select A, i have 'Button A Pressed', and that's OK,
> then I select B, I have: 'Button A Pressed' then 'Button B Pressed'.
>
> It seems in fact to repeat the last action before executing the current
> choice.
>
> Where is the problem ?
You forgot to set the NO_RELEASE keyword on the CW_BGROUP
function. Thus, you are getting both the previous button OFF and
next button ON events in your event handler.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: CW_BGROUP [message #21730 is a reply to message #21729] |
Mon, 18 September 2000 00:00  |
promashkin
Messages: 169 Registered: December 1999
|
Senior Member |
|
|
Set /NO_RELEASE keyword when creating button groups. By default, buttons
return events both when pressed (checked) and released (unchecked).
Cheers,
Pavel
|
|
|