Best way to determine user's screensize?

Grant Edwards grant.b.edwards at gmail.com
Sat Oct 31 11:22:30 EDT 2020


On 2020-10-31, Peter J. Holzer <hjp-python at hjp.at> wrote:

> Very often this is not the case: An image viewer will be used to
> display images which are larger than the screen.

Tell the image widget what image you want to display, and then forget
about it. Let the toolkit and window manager do their jobs.

> A MUA may have to display hundreds of mailboxes, and maybe tens of
> thousands of mails in a single mailbox.

No. It doesn't. It has to display a tree widget that shows N items and
holds tens of thousands of items, or a scrolling list widget than
shows M items and holds tens of thousands of items.  Pick reasonable
initial default values for N,M and then let the window manager and
user do the right thing.

> I am very much a fan of letting layout and window managers do as
> much as possible. But I don't think they can do everything. They
> simply don't have the necessary information.

They do in a well-written application.

--
Gran



More information about the Python-list mailing list