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

Home » Public Forums » archive » Re: buttons on exclusive base
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: buttons on exclusive base [message #12066 is a reply to message #12045] Wed, 10 June 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Cathy (csaute3@alumni.umbc.edu) writes:

> I have an exclusive base created by WIDGET_BASE(/EXCLUSIVE).
> (It can only have button children and only one button can be
> set at a time.) I use
>
> WIDGET_CONTROL, button, SET_BUTTON=1
>
> to select one button on in my main routine for my default and
> the rest of the buttons are off.
>
> Question: In my event loop, how do determine which button is
> on? Is there a keyword to WIDGET_INFO?

The selected button is identified by the ID field of the
event structure in your event handler. All the other buttons
will be de-selected automatically. If you want other parts
of the program to know the currently selected button,
you normally put a "currentButton" field in your info structure.

Your button event handler code might look something like this:

PRO Button_Events, event
Widget_Control, event.top, Get_UValue=infoPtr
(*infoPtr).currentButton = event.ID
END

Cheers,

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Previous Topic: ENVI?
Next Topic: Re: MEDIAN filtering and why it's not working

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

Current Time: Sat Oct 11 04:03:17 PDT 2025

Total time taken to generate the page: 0.32121 seconds