Am 08.02.16 um 15:34 schrieb jenswaelk...@gmail.com:
Op maandag 8 februari 2016 13:26:56 UTC+1 schreef Peter Otten:
jenswaelk...@gmail.com wrote:
I'm trying to set the geometry of my top window, but the size is
unaffected.
This is the code:
top.geometry('900x460')
thanks a lot for helping me out
The answer is correct, however I think that in general it is wrong to
set the geometry like this. grid and pack compute the necessary space
for the window themselves, which adapts to the length of labels on
buttons etc. In all GUI programs I've written, the only place to set
window sizes in pixels have been canvas widgets, which do not have a
native size derived from the content. Setting the size on the toplevel,
and in absolute numbers, i.e. not computed from other sizes, is likely
to lead to problems on different platforms, font sizes or theme changes.
Christian
--
https://mail.python.org/mailman/listinfo/python-list