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

Home » Public Forums » archive » Clearing WIDGET_TEXT fields with LOOP
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Clearing WIDGET_TEXT fields with LOOP [message #17858] Mon, 15 November 1999 00:00
Sean Heukels is currently offline  Sean Heukels
Messages: 25
Registered: November 1999
Junior Member
I created a widget where you can load multiple functions with different
numbers of variables to use as input. This widget can be changed if the user
changes the structure of the output, i.e. the user wants another outlay.
What happens is that the whole widget is destroyed and created immediately
after. (With different outlay and more / less WIDGET_TEXT fields)
Now, I created a button to clear these fields in a seperate PRO called
clearval and here I open the structure , named info defined as the U_VALUE
of the top.widget.
All the value's you use as input are called info.var1 , info.var2 etc etc.
all the way to info.var18. ONLY, I don't use each of them all the time.
Sometimes from var1 - var8 and sometomes from var 1 - var10.
To stop me from writing about 10 (or maybe in the future more) functions
that exist of :

WIDGET_CONTROL, info.var1, SET_VALUE=""
WIDGET_CONTROL, info.var2, SET_VALUE=""
etc etc
I want to create a loop that checks if the info.var exists and then checks
if it's a WIDGET_TEXT field (because other sort of values are also defined
in the structure named info)
I've tried a lot but can't seem to get it working.

for I=0L,N_Tags(info)-1 do $
WIDGET_CONTROL, info.(I), SET_VALUE=""

* Tried this one, but this one lacks the WIDGET_TEXT check and a check for
empty strings

for I=0L,N_Tags(info)-1 do $
if (Size(info.(I),/TNAME) eq 'STRING') then $
WIDGET_CONTROL, info.(I), SET_VALUE=""

* Tried this one, but this one lacks the WIDGET_TEXT check

For me this problem is beginning to become a teaser and I 've stated this
question before, but now it's as elaborate as I could make it, without
sending in the whole program

Help would be appreciated,

Sean Heukels
[Message index]
 
Read Message
Previous Topic: Re: overlying an image and a contour plot
Next Topic: Re: Good substitute for IDL

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

Current Time: Sat Oct 11 03:15:25 PDT 2025

Total time taken to generate the page: 0.08131 seconds