X device Resolution [message #4004] |
Fri, 21 April 1995 00:00  |
soc
Messages: 12 Registered: October 1994
|
Junior Member |
|
|
I am running IDL 3.6 on an ALPHA, under X windows. When using widgets
IDL arranges the widgets according to the pixel resolution available -
for example: sometimes a widget with a graphics window like xfont, will
not show the graphics window unless the window is maximised, and then
not all the window is seen, but leaving a huge gaping hole in the rest
of the window. Thi sdepends on the pixel resolution - if you have
enough pixels, then there is no problem (I have seen this on many
displays).
I see the same problem when I write widgets, and so my questios are:
1. does anyone have a way of getting the device resolution automatically
so I can scale my widget applications accordingly?
2. does anyone else consider this a bug - or at least as a colleague
here put it: "the default action is pretty weird!" - in IDL ?
Thanks in advance,
Rob O'Connell
|
|
|
Re: X device Resolution [message #4089 is a reply to message #4004] |
Mon, 24 April 1995 00:00  |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
soc@festival.ed.ac.uk (Stephen O'Connell) writes:
> I am running IDL 3.6 on an ALPHA, under X windows. When using widgets
> IDL arranges the widgets according to the pixel resolution available -
> for example: sometimes a widget with a graphics window like xfont, will
> not show the graphics window unless the window is maximised, and then
> not all the window is seen, but leaving a huge gaping hole in the rest
> of the window. Thi sdepends on the pixel resolution - if you have
> enough pixels, then there is no problem (I have seen this on many
> displays).
> I see the same problem when I write widgets, and so my questios are:
> 1. does anyone have a way of getting the device resolution automatically
> so I can scale my widget applications accordingly?
The GET_SCREEN_SIZE keyword to DEVICE should do what you want to do. For
example, in some of our software we put scroll bars around the entire widget to
make it fit within the screen, if necessary. Here's some sample lines from one
of our routines.
device, get_screen_size = sz
if (sz(0) ge 1280) and (sz(1) ge 1024) then sz(*) = 0
sz = sz < [1280,1024]
base = widget_base(title='CDS Technical Planning - raster definition',$
/column,/frame,x_scroll=sz(0),y_scroll=sz(1))
Note that if the display is large enough then it doesn't put on scroll bars.
> 2. does anyone else consider this a bug - or at least as a colleague
> here put it: "the default action is pretty weird!" - in IDL ?
Yes, I think it's pretty weird too. I don't know why it works that way, but
it's pretty frustrating.
Bill Thompson
|
|
|