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

Home » Public Forums » archive » Widget Button question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Widget Button question [message #87122] Wed, 08 January 2014 16:28 Go to next message
troydporter13 is currently offline  troydporter13
Messages: 5
Registered: January 2014
Junior Member
Hi,

I have a widget that has a set of non exclusive buttons;

options=['A', 'B', 'C', 'Select All']
bgroup=cw_bgroup( base, options, row=1, /nonexclusive, xoff=20, yoff= 75, uvalue='station_name' , SET_VALUE=[0,0,0,1], LABEL_Left='Select Option: ')

Is it possible to make it so that if the user clicks the 'Select All' button, the other buttons (A, B and C) cannot also be selected?

ATM you can click 'Select All' and also A, B or C which I would like to avoid.

Regards,
Troy
Re: Widget Button question [message #87123 is a reply to message #87122] Wed, 08 January 2014 17:59 Go to previous messageGo to next message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
When the "Select All" button is selected, use the event handler to make the other buttons insensitive by using the SENSITIVE keyword in Widget_Control.

http://www.exelisvis.com/docs/WIDGET_CONTROL.html
Re: Widget Button question [message #87126 is a reply to message #87123] Wed, 08 January 2014 21:48 Go to previous messageGo to next message
troydporter13 is currently offline  troydporter13
Messages: 5
Registered: January 2014
Junior Member
On Thursday, January 9, 2014 12:59:08 PM UTC+11, Matthew Argall wrote:
> When the "Select All" button is selected, use the event handler to make the other buttons insensitive by using the SENSITIVE keyword in Widget_Control.
>
>
>
> http://www.exelisvis.com/docs/WIDGET_CONTROL.html

How do I pick the 3 buttons I want though? I can't use bgroupas I get a message that the variable is undefined.

if all eq 1 then begin
WIDGET_CONTROL, bgroup, sensitive=0
endif
Re: Widget Button question [message #87133 is a reply to message #87126] Thu, 09 January 2014 06:19 Go to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
> How do I pick the 3 buttons I want though? I can't use bgroupas I get a message that the variable is undefined.

There are several ways of doing this. Here is one...


Use the RETURN_NAME and IDS keywords in CW_BGroup.

Store the widget IDs in the state variable of the widget.

Within the event handler, check to see if Event.Value is "Select All" (or whatever you named the select all button). If it is, cycle through the IDs in the state variable, making them insensitive (be sure to skip over the "Select All" button). Use the Get_Value keyword to Widget_Control to retrieve the names of the buttons, if need be.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: SVN bug makes project properties tab invisible at first
Next Topic: scatter light correction

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

Current Time: Wed Oct 08 15:23:32 PDT 2025

Total time taken to generate the page: 0.00473 seconds