comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Widget Event Handling Problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Widget Event Handling Problem [message #14937] Mon, 12 April 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Jason Brookes <jason.brookes@rmsb.u-bordeaux2.fr> writes:

> I have been experiencing an annoying widget-event handling problem. I
> create a widget "sub-panel" on which the user is allowed to set
> (exclusively) one of four possible buttons, each button corresponding to
> a different image. I have included the relevant code from the widget
> creation and event handling functions below. The problem is that
> whenever one of the four buttons is selected, the event handling routine
> is entered twice, AS IF responding to both the previous mouse button
> release, and the current mouse button press (this may or may not be what
> is actually happening). For example, if button_3 is currently set, and
> the user sets button 1, the event handling routine will first execute
> the code corresponding to 'stim_3' in the CASE statement followed by the
> code corresponding to 'stim_1'. I would much rather it executed only the
> code corresponding to 'stim_1'.
> Hope my explanation is clear(ish). Can anybody enlighten me ?

Exclusive buttons do indeed generate both an unselect and select
event. That is, unless, you set the /No_Release keyword on the
buttons, in which case they only generate select events.

> While I'm at it, is there an elegant way of updating the maximum value
> for a floating-point slider ?

No, no elegant way without hacking the code.

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
[Message index]
 
Read Message
Read Message
Previous Topic: Re-setting null values for compound button widget
Next Topic: Re: Widget-event handling problem

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:25:45 PDT 2025

Total time taken to generate the page: 0.00380 seconds