Using Y_SCROLL_SIZE and COLUMN=8 on Mac widgets [message #86323] |
Sat, 26 October 2013 18:27  |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
The following simple code works fine on a PC -- displaying 8 columns of data as requested. But on my Mac laptop it only shows a couple of columns.
***************
pro test
values = 's' + strtrim(indgen(200),2)
base = widget_base()
bgroup = cw_bgroup(base,values,column=8,y_scroll_size=600)
widget_control,base,/realize
****************
Now the IDL documentation does say that
"Use of the Y_SCROLL_SIZE keyword implies SCROLL. This means that scroll bars will be added in both the horizontal and vertical directions when Y_SCROLL_SIZE is specified. Because the default size of the scrolling viewport may differ between platforms, it is best to specify X_SCROLL_SIZE when specifying Y_SCROLL_SIZE."
And I can get a workaround by adding x_scroll_size = 300 for the Mac. The problem is that the necessary x_scroll_size depends on the length of the text being displayed (and the font size used). But on the PC, IDL automatically know what X size the widget should have to display 8 columns.
Any suggestions for kluge to make the above code work on a Mac? Thanks, --Wayne
P.S. I used cw_bgroup above to keep the code simple, but the problem also exists when using the Column and Y_scroll_size keywords with widget_base().
|
|
|