Clearing fields in widgets [message #17790] |
Mon, 08 November 1999 00:00 |
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.
NOw I created a button to clear these fields in a own PRO called clearval
and here I open the structure info defined as the U_VALUE of the top.widget.
The problem now is that I clear all the fields here and as soon as I want to
clear a field that HAS been defined in the structure info, but just hadn't
been filled with data, creates an error.
I can ofcourse create seperate PRO clearval 's but i want to solute it an
other way.
Anyone have a clue ??
Thank u Sean
PRO clearfields, event
; Read info
WIDGET_CONTROL, event.top, GET_UVALUE=info, /NO_COPY
; Could't find a BETTER way to do this.
; Created a lot of vars for future use.
WIDGET_CONTROL, info.var1, SET_VALUE=""
WIDGET_CONTROL, info.var2, SET_VALUE=""
WIDGET_CONTROL, info.var3, SET_VALUE=""
WIDGET_CONTROL, info.var4, SET_VALUE=""
WIDGET_CONTROL, info.var5, SET_VALUE=""
WIDGET_CONTROL, info.var6, SET_VALUE=""
WIDGET_CONTROL, info.var7, SET_VALUE=""
;WIDGET_CONTROL, info.var8, SET_VALUE="" ; This is where it goes wrong !!
;WIDGET_CONTROL, info.var9, SET_VALUE=""
;WIDGET_CONTROL, info.var10, SET_VALUE=""
|
|
|