Best way to determine user's screensize?

flaskee flaskee at protonmail.com
Fri Oct 30 18:54:17 EDT 2020


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, October 30, 2020 5:31 PM, Igor Korot <ikorot01 at gmail.com> wrote:

> Hi,
>
> On Fri, Oct 30, 2020 at 4:20 PM Random832 random832 at fastmail.com wrote:
>
> > On Fri, Oct 30, 2020, at 12:05, Grant Edwards wrote:
> >
> > > Why do you think that's something your application needs to know?
> > > I hate applications that think just because they've been started
> > > they now own the entire computer and everything reachable from it.
> > > All you need to know is how big your application window is. The user's
> > > available screen size is none of your business.
> >
> > The application decides how big the application window is. The user can resize it, but there's no reason for the screen size not to be one of the inputs considered for the initial choice.
>
> Nope.
> It is nNOT up to application.
> It is either up to the developer (if he calls Maximize() ) on the main
> frame, or the OS if the main frame is using defaults.
>
> Thank you.
>

Exactly Igor & random832.

I have done all of this resizing and layout stuff before.

I just ignored the grouchy user with the hate over me wanting screensize.
(every list has one of those types, eh? :-)

Screensize, in part, determines the aspect ratio calcs to dynamically
resize and place the components on the screen.


Anyway, I'm pushing on to do this under python.
With, or without, Mr. Grouchy.

Igor --- I think you asked why for portrait vs landscape?

It is so that when the user flips a phone or
tablet to the side (landscape), or straight up/down (portrait)
that the widgets can be dynamically resized & re-positioned to fit.

In actionscript a RESIZE event fires when flipping to the side or back,
that can then be reacted to, to reposition things.

I just need to re-figure this all out under Python, et al.

Thanks




More information about the Python-list mailing list