Scrolling draw window question [message #42466] |
Wed, 09 February 2005 17:37 |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
Here is a short script that displays an image in a scrolling draw window:
base = WIDGET_BASE()
draw = WIDGET_DRAW(base, RETAIN = 2, $
XSIZE = 400, $
YSIZE = 400, $
X_SCROLL_SIZE = 200, $
Y_SCROLL_SIZE = 400)
WIDGET_CONTROL, BASE, /REALIZE
TVSCL, DIST(400)
The idea is to scroll in only one dimension (horizontal in this case).
When I run this script, the display window appears to be a few pixels
smaller than the image size of 400. As a result, there is a
y-scrollbar; and moving y-slider moves the image up and down slightly.
This is on Mac OS X with X11.
So, how do I make one dimension of the viewable window match the image
size?
(The SCR_XSIZE and SCR_YSIZE keywords seem to make the problem worse.)
Thanks, Ken Bowman
|
|
|