Hi Timothy,
What about doing this, that seems to "fix" this issue:
pro widget_table_ex
compile_opt idl2
wBase = Widget_Base(/COLUMN)
col_widths = [350,150,70,70,100,100,60,110]
xscrollsize= 20
ncol=n_elements(col_widths)
xs=col_widths[0]
for i=1, ncol-1 do xs=col_widths[i]+ xs
rows = 350
cols = N_Elements(col_widths)
backgroundColors = MAKE_ARRAY( 3, cols, 2, /BYTE )
backgroundColors[0,*,0] = 153 ; mint-green
backgroundColors[1,*,0] = 255
backgroundColors[2,*,0] = 204
backgroundColors[*,*,1] = 255 ; white
VALUE = strarr(cols,rows)
value[*] = ''
WID_obs_table = Widget_table(wBase, UNAME='WID_obs_table' ,$
FRAME=1, $
SCR_XSIZE=xs + xscrollsize, $
column_widths=col_widths,$
/EDITABLE,$
/all_events, $
/RESIZEABLE_COLUMNS, $
VALUE = value, $
BACKGROUND_COLOR = backgroundColors,$
scr_ysize = 800, $
/no_row_headers, Event_func = 'OBS_table_Event')
Widget_Control, wBase, /REALIZE
end
Basically, I added this keyword:
SCR_XSIZE=xs + xscrollsize
Where "xs" is the size in pixels of all the columns, and xscrollsize is the size of the scroll bar. Note that the screen width of the widget includes the width of scroll bars (see SCR_ZSIZE).
I'm not sure this is the best workaround, but it seems to work.
Cheers,
Fernando
|