Best way to determine user's screensize?

Peter J. Holzer hjp-python at hjp.at
Sat Oct 31 12:48:55 EDT 2020


On 2020-10-31 01:20:39 -0000, Grant Edwards wrote:
> On 2020-10-30, Peter J. Holzer <hjp-python at hjp.at> wrote:
> 
> > So, assuming the user is invoking the application for the first time,
> > how should an application determine how much of the screen it should
> > use?
> 
> You arrange the widgets the way you want them using the user's
> settings for the toolkit and let the sizers figure out the size.

Ok. I am trying one last time.

Consider a very minimalistic image viewer. It has a menu bar at the top
and shows one image. The path to the image may be passed as sys.argv[1],
in which case it should be immediately displayed. The image should be
displayed in "natural" size but must be scaled down if it doesn't fit.


How do you do that?

You may use any framework, preferrably (since this is a Python group)
a cross-platform framework usable from Python.

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp at hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://mail.python.org/pipermail/python-list/attachments/20201031/c701f5b6/attachment.sig>


More information about the Python-list mailing list