![planet earth widget planet earth widget](https://sib7.com/images/watermarked/1/detailed/31/3596__1__SiB7.jpg)
Note that we must realize the widgets before retrieving this value.
![planet earth widget planet earth widget](https://app.skufetch.com/images.tmp/Floating_Globe_Offic_1196_0_res.jpg)
WIDGET_CONTROL, base, /REALIZE Retrieve the widths of the columns of the first table.
![planet earth widget planet earth widget](https://static.electronicsweekly.com/wp-content/uploads/2017/11/29171103/Earth-Tim-Peake.jpg)
base = WIDGET_BASE(/COLUMN) table1 = WIDGET_TABLE(base, VALUE=data, /COLUMN_MAJOR, $ ROW_LABELS=labels, COLUMN_LABELS= '', $ COLUMN_WIDTHS=maxwidth, /RESIZEABLE_COLUMNS) table2 = WIDGET_TABLE(base, VALUE=data, /ROW_MAJOR, $ ROW_LABELS= '', COLUMN_LABELS=labels, /RESIZEABLE_COLUMNS) b_quit = WIDGET_BUTTON(base, VALUE= 'Quit', $ EVENT_PRO= 'table_widget_example2_quit_event') Realize the widgets. + 6 for padding Create base widget, two tables (column- and row-major, respectively), and 'Quit' button. max_strlen = strlen( 'Orbit Radius (AU)') maxwidth = max_strlen * !d.x_ch_size + 6. labels = To make sure the table looks nice on all platforms, set all column widths to the width of the longest string that can be a header. data = Create labels for the rows or columns of the table. d0= Combine structure data into a vector of structures.
#Planet earth widget pro#
PRO table_widget_example2 Create some structure data. Event-handler routine for 'Quit' button PRO table_widget_example2_quit_event, ev WIDGET_CONTROL, ev.TOP, /DESTROY END Widget creation routine. See Running the Example Code if IDL does not run the program as expected. Run this example procedure by entering table_widget_example2 at the IDL command prompt or view the file in an IDL Editor window by entering. pro in the examples/doc/widgets subdirectory of the IDL distribution. This example is included in the file table_widget_example2. The following procedures build a simple application that displays the same structure data in two table widgets one in row-major format and one in column-major format.