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

Home » Public Forums » archive » Re: state = WIDGET_INFO( button, /BUTTON_SELECT )
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: state = WIDGET_INFO( button, /BUTTON_SELECT ) [message #10485] Thu, 11 December 1997 00:00 Go to previous message
Alex Schuster is currently offline  Alex Schuster
Messages: 124
Registered: February 1997
Senior Member
David Fanning wrote:

>> WIDGET_INFO does not know this keyword. I think it should,
>> what about you?
>
> I agree. Have you asked the nice folks at RSI to add it?
> They usually follow through on reasonable requests like this.

They'll get a copy of the posting.


>> And did anyone yet need WIDGET_CONTROL, GET_VALUE to
>> get the _text_ of a button? Or am I, as so often,
>> just missing something?
>
> Hum, that is how I almost *always* find out which button
> caused the event. I like to branch in my case statement
> on something I can read that makes sense to me. But then,
> I'm usually missing something too. :-)

Yikes! I change the texts on my buttons way too often for that...
In my programs, every button gets assigned its own event handling
routine.

While I was at it, I wrote a small procedure:

pro button_state_event, event
widget_control, event.id, get_uvalue=uvalue, /no_copy
uvalue.state = event.select
widget_control, event.id, set_uvalue=uvalue, /no_copy
end


I create my buttons like this:

state = 1
button = widget_button( base, event_pro='button_state_event', $
uvalue={ state:state }, value='A Button' )
widget_control, button, set_button=state


When I need the value later, I just look at the uvalue.


Alex
--
Alex Schuster Wonko@weird.cologne.de PGP Key available
alex@pet.mpin-koeln.mpg.de
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Plug-in for triangulate
Next Topic: Placement of Floating widgets

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

Current Time: Fri Oct 10 06:44:52 PDT 2025

Total time taken to generate the page: 0.87981 seconds