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

Home » Public Forums » archive » widget_table
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: widget_table [message #54935 is a reply to message #15223] Tue, 17 July 2007 14:21 Go to previous messageGo to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
2d@onetel.com wrote:
> 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
>

Hi,
You must use WIDGET_CONTROL, tableID, GET_VALUE=table_value ... it
could be in your quit method or elsewhere. Store tableID either in your
quit button uvalue (poor technique if you want to do something else), or
save a pointer to a structure (or to a pointer array), which would
contain, at least, the tableID.

Jean
[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
Previous Topic: making DIALOG_MESSAGE jump out
Next Topic: Tab completion of variables and routines at the IDL command line

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

Current Time: Sat Oct 11 01:33:26 PDT 2025

Total time taken to generate the page: 1.76177 seconds