[Q]Finding Screen Resolution in IDL [message #6821] |
Wed, 28 August 1996 00:00  |
Tim Patterson
Messages: 65 Registered: October 1995
|
Member |
|
|
I have a large IDL widget application that creates a number
of windows of varying sizes. The problem is that some of
the machines it runs on have differing screen resolutions
i.e. 100 dpi vs 75 dpi. If I use a 14 point font, it looks fine
on the 100dpi screen, but too large on the 75dpi screen
(the windows are too large and therefore hard to work with
when there are a number open). But if I use, say, a 10point
font, the windows look greta on the lower resolution screen, but
unreadable on the high resolution one.
So, is there a way to test which resolution screen I'm on and
set the font point-size accordingly (perhaps something using
the size of the screen in pixels which I can get via IDL).
Cheers
Tim
|
|
|
Re: [Q]Finding Screen Resolution in IDL [message #7000 is a reply to message #6821] |
Wed, 04 September 1996 00:00  |
Tim Patterson
Messages: 65 Registered: October 1995
|
Member |
|
|
Thanks for the useful hints. In case anybody is interested,
the solution I came up with was the following, which appears
to work on the machines I have access to.
The user can define a specified environment variable to
be either 10,12 or 14. If this env. var. exists and has
a sensible value, then that's the font size I use for
the widgets.
If the variable isn't set up properly, then I check the
value of !d.y_ch_size. If this is less than 10, then I
set the font size to 12, otherwise I set it to 10. This
appears to work and keep the widgets reasonably to a
similar size on 100 dpi and 75 dpi font workstations.
Tim
|
|
|