Widget scrolling [message #38654] |
Thu, 18 March 2004 06:22 |
Ian Dean
Messages: 26 Registered: January 2000
|
Junior Member |
|
|
Hi,
I am using IDL 5.4 under OpenVMS 7.1 (for my sins), and I am attempting
to something similar to using a table widget (!!!!). I need to do this to
give me more control over headings, labels, columns etc.
However, I find that using the arrows at the top & bottom of the scroll
bar causes the table to scroll by what looks like a pixel at a time, making
it less user friendly.
Out of interest, the same code scrolls satisfactorily under windows.
Is this a feature of X-windows, OpenVMS or am I missing something?
PRO Scroll
Base = WIDGET_BASE(XSIZE = 300, YSIZE = 250, /COLUMN)
Title = WIDGET_BASE(Base, COLUMN = 2)
Head1 = WIDGET_TEXT(Title, VALUE = 'Column 1', XSIZE = 17)
Head2 = WIDGET_TEXT(Title, VALUE = 'Column 2', XSIZE = 17)
Text = [['Line' + SINDGEN(50)], ['Data' + SINDGEN(50)]]
Table = WIDGET_BASE(Base, COLUMN = 2, Y_SCROLL_SIZE = 150, $
X_SCROLL_SIZE = 250, /FRAME)
Col1 = WIDGET_TEXT(Table, VALUE = Text[*, 0], XSIZE = 17, YSIZE = 20)
Col2 = WIDGET_TEXT(Table, VALUE = Text[*, 1], XSIZE = 17, YSIZE = 20)
WIDGET_CONTROL, Base, /REALIZE
END
Obviously, I cannot add scroll bars to the text widgets, as they both need
to scroll together. The column titles must also remain at the top.
The above code is a cut-down version and the final cut will handle 1 or more
columns & row labels.
Regards,
Ian
|
|
|