Re: Dpi and Resolution issues



On 31 Jan., 14:16, Plebeian <casey.ack...@xxxxxxxxx> wrote:
Resize fails; because that is not a valid arg for wm.

Oh yes, my bad -- the keyword is "geometry", not "resize". So make
that

wm geometry . [expr [winfo screenwidth .]/2]x[expr [winfo
screenheight .]/2]

Now, having not actually seen how that works. I do have this question.
Is that going to mess up my hard work of aligning the UI how I wanted
it?

Depends - you should use [grid] or [pack] as geometry manager, and
tweak the respective configurations:
(grid) - look at -sticky and -weight
(pack) - look at -fill and -expand

If you use [place], you have to experiment for yourself... :^)

I didn't hardcode any sizes; aside from the size of the Toplevel and a
few entry/listbox widgets.

Often it's best to specify no sizes at all, and first just look how
the defaults come out. Only if they're unsuitable, start sparingly to
add size hints.

The user may have his own ideas which may not be the same as the
coder's... so give the user freedom to resize the whole window, as
well as subparts (using panedwindows).
.


Quantcast