Is there a way to know the resolution of the screen you're working on?
I need my app and widgets to appear the same size relative to the screen actual size
whether I'm on 800X600 or 1024X768.
Thanks.
Jorge.
Is there a way to know the resolution of the screen you're working on?
I need my app and widgets to appear the same size relative to the screen actual size
whether I'm on 800X600 or 1024X768.
Thanks.
Jorge.
Try
from wxPython import wx
rect = wx.wxClientDisplayRect()
print rect
-----Original Message-----
From: Jorge Hojyo [mailto:hojyoj@prodigy.net.mx]
Sent: Friday, April 25, 2003 1:50 PM
To: wxPython-users@lists.wxwindows.org
Subject: [wxPython-users] Screen Resolution Question
Is there a way to know the resolution of the screen you're working on?
I need my app and widgets to appear the same size relative to the screen
actual size
whether I'm on 800X600 or 1024X768.
Thanks.
Jorge.
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
Ok, It helped
I'm thinking of applying a factor based on this info to font sizes and other things,
so they appear the same size in either resolution, Do you know an easier way to do this?
Thanks.
Jorge.
David Woods wrote:
Try
from wxPython import wx
rect = wx.wxClientDisplayRect()
print rect-----Original Message-----
From: Jorge Hojyo [mailto:hojyoj@prodigy.net.mx]
Sent: Friday, April 25, 2003 1:50 PM
To: wxPython-users@lists.wxwindows.org
Subject: [wxPython-users] Screen Resolution QuestionIs there a way to know the resolution of the screen you're working on?
I need my app and widgets to appear the same size relative to the screen actual size
whether I'm on 800X600 or 1024X768.Thanks.
Jorge.
Jorge Hojyo wrote:
I'm thinking of applying a factor based on this info to font sizes and
other things,
so they appear the same size in either resolution, Do you know an easier
way to do this?
Frankly, I think this is a dead end. To do this, you'll have to control
the sizes of everything, and you'll be messing with different people's
ideas about how big they want things. Some folks run a low resolution
because they want things to be big. Also, using a small font on a
low-res screen gets kindo f hard to read.
However, you have your reasons. One thing you'll need to know is how
many Pixels per inch wxWindows thinks your monitor is, so you can scale
to points, as the fonts take points as input (very annoying if you ask
me....)
You can do this with:
DC.GetPPI()
Note that I run wxPython on Windows and Linux with the same resolution,
but get different numbers for GetPPI(), so this is important.
-Chris
-- --
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov
Jorge Hojyo wrote:
I'm thinking of applying a factor based on this info to font sizes and other things,
so they appear the same size in either resolution, Do you know an easier way to do this?
The basic problem with this idea is that people generally choose a specific resolution because it makes fonts about the size that they want. I typically run 800x600 on 15" monitors and 1024x768 on 17" monitors, with the result that fonts are pretty close to the same size on either one. Your attempt to adjust font size based on screen resolution will defeat that, making fonts much larger on my 17". The whole reason I have the resolution higher is so that I can see more text when I have more screen space. I think you'll end up irritating far more users than you please.
Jeff Shannon
Technician/Programmer
Credit International
It seems I still don't have the backgroung for this objects (DC), I couldn't apply it. I got other options
I could apply (wxSystemSettings_GetSystemMetric, wxClientDisplayRect).
Thanks.
Anyway, due to your comments and of others on people using different resolutions to suit their
likings, I'll give a second tought to this subject.
Jorge.
Chris Barker wrote:
Jorge Hojyo wrote:
I'm thinking of applying a factor based on this info to font sizes and
other things,
so they appear the same size in either resolution, Do you know an easier
way to do this?
Frankly, I think this is a dead end. To do this, you'll have to control
the sizes of everything, and you'll be messing with different people's
ideas about how big they want things. Some folks run a low resolution
because they want things to be big. Also, using a small font on a
low-res screen gets kindo f hard to read.However, you have your reasons. One thing you'll need to know is how
many Pixels per inch wxWindows thinks your monitor is, so you can scale
to points, as the fonts take points as input (very annoying if you ask
me....)You can do this with:
DC.GetPPI()
Note that I run wxPython on Windows and Linux with the same resolution,
but get different numbers for GetPPI(), so this is important.-Chris
Maybe you're right, I'll give it a second tought.
Jorge.
Jeff Shannon wrote:
Jorge Hojyo wrote:
I'm thinking of applying a factor based on this info to font sizes and other things,
so they appear the same size in either resolution, Do you know an easier way to do this?The basic problem with this idea is that people generally choose a specific resolution because it makes fonts about the size that they want. I typically run 800x600 on 15" monitors and 1024x768 on 17" monitors, with the result that fonts are pretty close to the same size on either one. Your attempt to adjust font size based on screen resolution will defeat that, making fonts much larger on my 17". The whole reason I have the resolution higher is so that I can see more text when I have more screen space. I think you'll end up irritating far more users than you please.
Jeff Shannon
Well, now I came up with a solution, the answer is using sizers for the font size of the text.
Maybe it will be available soon?
Jorge.
Jorge Hojyo wrote:
Maybe you're right, I'll give it a second tought.
Jorge.
Jeff Shannon wrote:
Jorge Hojyo wrote:
I'm thinking of applying a factor based on this info to font sizes and other things,
so they appear the same size in either resolution, Do you know an easier way to do this?The basic problem with this idea is that people generally choose a specific resolution because it makes fonts about the size that they want. I typically run 800x600 on 15" monitors and 1024x768 on 17" monitors, with the result that fonts are pretty close to the same size on either one. Your attempt to adjust font size based on screen resolution will defeat that, making fonts much larger on my 17". The whole reason I have the resolution higher is so that I can see more text when I have more screen space. I think you'll end up irritating far more users than you please.
Jeff Shannon
Is there a wx way to get this information for multiple monitors?
David Woods wrote:
Try
from wxPython import wx
rect = wx.wxClientDisplayRect()
print rect
I don't believe so. I seem to recall there was some discussion of that a
couple of months ago on the list, and if memory serves, (a BIG if), it
couldn't be done.
-----Original Message-----
From: Shane Holloway (IEEE) [mailto:shane.holloway@ieee.org]
Sent: Friday, April 25, 2003 1:12 PM
To: wxPython-users@lists.wxwindows.org
Subject: Re: [wxPython-users] Screen Resolution Question
Is there a wx way to get this information for multiple monitors?
David Woods wrote:
Try
from wxPython import wx
rect = wx.wxClientDisplayRect()
print rect
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
What about this? (completely untested)
width = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_X)
height = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_Y)
--- David Woods <dwoods@wcer.wisc.edu> wrote:
I don't believe so. I seem to recall there was some discussion
of that a couple of months ago on the list, and if memory
serves, (a BIG if), it couldn't be done.
=====
Donnal Walter
Arkansas Children's Hospital
I have dual monitors, both set to 1280 x 1024 resolution. The following
code:
from wxPython import wx
width = wx.wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_X)
height = wx.wxSystemSettings_GetSystemMetric(wx.wxSYS_SCREEN_Y)
rect = wx.wxClientDisplayRect()
print width, height, rect
produced:
(1280, 1024, (0, 0, 1280, 996))
This suggests to me that wxClientDisplayRect() is sensitive to the height of
the Taskbar (confirmed on further experimentation), but that they both can
see only the main monitor.
-----Original Message-----
From: Donnal Walter [mailto:donnalcwalter@yahoo.com]
Sent: Friday, April 25, 2003 1:36 PM
To: wxPython-users@lists.wxwindows.org
Subject: RE: [wxPython-users] Screen Resolution Question
--- David Woods <dwoods@wcer.wisc.edu> wrote:
I don't believe so. I seem to recall there was some discussion
of that a couple of months ago on the list, and if memory
serves, (a BIG if), it couldn't be done.
What about this? (completely untested)
width = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_X)
height = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_Y)
=====
Donnal Walter
Arkansas Children's Hospital
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
Actually:
width = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_X)
height = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_Y)
do work, but the interesting thing is that (on Win2K, at least) they
won't report the correct X size if you have more than two monitors.
Yes, I know it's odd, but I use three monitors (cheap to do and a wonderful
working environment, btw) and the width reported by the above call
is 3200x1200 even though it's really 4800x1200.
#--------------------------------
Jeff Sasmor
jeff@sasmor.com
----- Original Message -----
From: "Donnal Walter" <donnalcwalter@yahoo.com>
To: <wxPython-users@lists.wxwindows.org>
Sent: Friday, April 25, 2003 2:35 PM
Subject: RE: [wxPython-users] Screen Resolution Question
--- David Woods <dwoods@wcer.wisc.edu> wrote:
I don't believe so. I seem to recall there was some discussion
of that a couple of months ago on the list, and if memory
serves, (a BIG if), it couldn't be done.
What about this? (completely untested)
width = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_X)
height = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_Y)
=====
Donnal Walter
Arkansas Children's Hospital
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
But they didn't work on my dual monitor system using Win2K. I wonder why. Could it be that they report for N-1 monitors?
Jeff Sasmor wrote:
Actually:
width = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_X)
height = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_Y)do work, but the interesting thing is that (on Win2K, at least) they
won't report the correct X size if you have more than two monitors.
Yes, I know it's odd, but I use three monitors (cheap to do and a wonderful
working environment, btw) and the width reported by the above call is 3200x1200 even though it's really 4800x1200.#--------------------------------
Jeff Sasmor
jeff@sasmor.com
----- Original Message ----- From: "Donnal Walter" <donnalcwalter@yahoo.com>
To: <wxPython-users@lists.wxwindows.org>
Sent: Friday, April 25, 2003 2:35 PM
Subject: RE: [wxPython-users] Screen Resolution Question--- David Woods <dwoods@wcer.wisc.edu> wrote:
I don't believe so. I seem to recall there was some discussion
of that a couple of months ago on the list, and if memory
serves, (a BIG if), it couldn't be done.What about this? (completely untested)
width = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_X)
height = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_Y)=====
Donnal Walter
Arkansas Children's Hospital---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
David Woods wrote:
I have dual monitors, both set to 1280 x 1024 resolution. The following
code:from wxPython import wx
width = wx.wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_X)
height = wx.wxSystemSettings_GetSystemMetric(wx.wxSYS_SCREEN_Y)
rect = wx.wxClientDisplayRect()
print width, height, rectproduced:
(1280, 1024, (0, 0, 1280, 996))
This suggests to me that wxClientDisplayRect() is sensitive to the height of
the Taskbar (confirmed on further experimentation), but that they both can
see only the main monitor.
I think there has been some code added to the 2.5 tree for dealing with multiple monitors, but I don't know if it handles all the platforms yet.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!