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

Home » Public Forums » archive » Button Events question
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: Button Events question [message #41048 is a reply to message #40860] Wed, 15 September 2004 10:45 Go to previous message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
I had the same annoying problem. A solution is to set the event handler
for cw_bgroup (event_func='widFileType_event') and to write a function

FUNCTION widFileType_event, event

return, 0

END

cw_bgroup will always create events, that's the way it is written. The
reason why the above works is that if you specify an event *function*
(as opposed to an event procedure), IDL will call that function and
inspect the return value. If the return value is a valid event structure
(a structure with the fields ID, TOP and HANDLER), it will take that
return value and move up the widget hierarchy until it finds another
event handler, to which it passes that structure. If the return value is
not a valid event structure (like above, where we return zero), it is
discarded and no further events are generated.

This mechanism gets important when you want to write compound widgets
for which you want to allow their own event procedures or functions. For
further details, read "Widget Event Processing" in the IDL help.

Good luck,
Benjamin



Jeff Patrick wrote:
> I have a program that uses a number or radio buttons to get numeric
> data. I don't need the buttons to respond to any events, but every
> time I click on them an event error is generated in the IDL 5.3
> programming environment. The event basically says that it could not
> find the event handler. Everything works fine I just find these event
> error annoying. Is there something I can set in the following line
> that will suppress these errors or prevent the button group from
> generating an event?
>
> widFileType = CW_BGROUP(widSetupDataTLB, ['Delta', 'dB'], UNAME =
> 'widMapView', LABEL_LEFT = 'Input File Type :', /NO_RELEASE,
> /EXCLUSIVE, /ROW )
>
> Thanks in advance,
>
> Jeff
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: xinteranimate
Next Topic: Re: Saving Color Tables

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

Current Time: Sun Oct 12 05:04:53 PDT 2025

Total time taken to generate the page: 0.71992 seconds