widget_table [message #54937] |
Tue, 17 July 2007 14:00 |
2d
Messages: 24 Registered: July 2007
|
Junior Member |
|
|
I want to create a widget_table with default values and then change
the values from the widget and then transfer those values back to a
calling programme. A possible way of doing this is shown below, where
a calling routines calls the routine imager_parameters transfers
default settings to the widget. The widget is editable so i can alter
the values. However, i dont seem to be able to read these values back
to the calling routine. Does anyone have a suggestion as to how i can
do this.
many thanks, 2d
PRO imager_parameters_quit_event, ev
COMPILE_OPT hidden
WIDGET_CONTROL, ev.TOP, /DESTROY
END
PRO imager_parameters, fov, freq, sensitivity
d0={fov:fov, freq:freq, sensitivity:sensitivity}
data = [d0]
labels = ['FOV[Deg]', 'Freq[GHz]', 'Sensitivity[K]']
maxwidth = 30
base = WIDGET_BASE(/COLUMN)
table = WIDGET_TABLE(base, VALUE=data, /EDITABLE, /COLUMN_MAJOR, $
ROW_LABELS=labels, COLUMN_LABELS=['Imager Value'], $
COLUMN_WIDTHS=maxwidths, /RESIZEABLE_COLUMNS)
b_quit = WIDGET_BUTTON(base, VALUE='Quit', $
EVENT_PRO='imager_parameters_quit_event')
WIDGET_CONTROL, base, /REALIZE
XMANAGER, 'imager_parameters', base
END
|
|
|