Re: Dpi and Resolution issues
- From: suchenwi <richard.suchenwirth-bauersachs@xxxxxxxxxxx>
- Date: Thu, 31 Jan 2008 05:48:35 -0800 (PST)
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).
.
- References:
- Dpi and Resolution issues
- From: Plebeian
- Re: Dpi and Resolution issues
- From: suchenwi
- Re: Dpi and Resolution issues
- From: Plebeian
- Dpi and Resolution issues
- Prev by Date: Re: Button doesn't have to resize when the screen resolution is changed
- Next by Date: Re: Why doesn't foreach return a value
- Previous by thread: Re: Dpi and Resolution issues
- Next by thread: Re: Dpi and Resolution issues
- Index(es):