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

Home » Public Forums » archive » WIDGETS
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: WIDGETS [message #2895 is a reply to message #2717] Thu, 01 September 1994 10:30 Go to previous messageGo to previous message
zawodny is currently offline  zawodny
Messages: 121
Registered: August 1992
Senior Member
In article <344g63$b8r@sun4.bham.ac.uk> sjt@xun8.sr.bham.ac.uk (James Tappin) writes:
> mallozzi@ssl.msfc.nasa.gov wrote:
> : I recently began to use IDL WIDGETS (on DEC ALPHA) and I have a minor
> : problem: I created a base WIDGET with multiple editable text children
> : to be used as
> : an editable menu. I invoke the WIDGET and register it with XMANAGER, with
> : the keyword JUST_REG. When I want control of the WIDGET, I type
> : XMANAGER, widget_id. The problem is as follows: I want to be able to
> : desensitize some of the children, so the user can only alter a single
> : menu entry (I am running a complicated IDL code
> : concurrently). I thought I could destroy the WIDGET and rebuild it with
> : only one child sensitive. Is this possible, or is there a more
> : appropriate method? Thanks -Bob
>
> If you save the ID's of the widgets which you want to change in a common
> block, then you can just use WIDGET_CONTROL, SENSITIVE=1 (or 0) to
> (de)sensitize the relevant widgets.
>
> --
> James Tappin,

No, no, no! You should avoid using common blocks in widget programming. I
sense and desense widgets of all sorts routinely. My personal preference
is to create a structure with one of the fields set to be a long integer
array and I store the widget id's of the widgets I need to manipulate or
(de)sensitize in this array (the structure is required only if you need to
pass other data besides the widget id's). That way a simple

widget_control,event.id,get_uvalue=array

statement gets the info I need without using common blocks. The problem is
that you might have multiple versions of the same widget running
concurrently. If you do and use common blocks to pass data between
widgets, the common blocks can (and do) get scrambled.

--
Joseph M. Zawodny (KO4LW) NASA Langley Research Center
Internet: zawodny@arbd0.larc.nasa.gov MS-475, Hampton VA, 23681-0001
TCP/IP: ko4lw@ko4lw.ampr.org Packet: ko4lw@n4hog.va.usa
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: widgets
Next Topic: Sort without loops

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

Current Time: Wed Oct 08 13:56:06 PDT 2025

Total time taken to generate the page: 0.00488 seconds