programming with widgets [message #66408] |
Tue, 12 May 2009 12:25 |
natha
Messages: 482 Registered: October 2007
|
Senior Member |
|
|
Hi folks,
I'm a little bit confused when I use widgets..
To create a widget, sometimes I use objects with a function called
GenericClassEventHandler.
Something like this:
function widget::Init()
self.base=widget_base(uvalue=self)
...
xmanager, 'widget', self.base,
event_handler='genericclassevent_handler'
return,1
end
Sometimes I create procedures using the state structure in a User
Value. For example:
...
state={var_a: 0l, var_b: 0l}
widget_control, base, set_uvalue=state, /no_copy
...
I don't know which is the best option to preserve the application
state and some variables...
Now, I need to create a widget to display a list of options. The user
will select one option and he'll close the widget. Something like the
DIALOG_MESSAGE() using the QUESTION keyword.
Something like this: result=MY_WIDGET(options)
So, for do that, which is the best option?? Any ideas or
suggestions ?
Thanks,
nata
|
|
|