468,549 Members | 1,955 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,549 developers. It's quick & easy.

How can I set the size of a window with tkinter?

Hi

I create a canvas that is to big for the default window-size, so it gets cut
to fit...
How can I increase the window-size to make sure the canvas fits?

regards tores
Sep 27 '05 #1
3 26247
Tor Erik Sønvisen wrote:
I create a canvas that is to big for the default window-size, so it gets cut to fit...


what default window size? what geometry management approach are
you using?

(if you're using pack or grid, your toplevel window should adapt itself
to the canvas size, unless you're using an obnoxious window manager.
if you do, Tkinter may not be able to do much about that...)

</F>

Sep 27 '05 #2
You may want to read this scrollbar page:

http://effbot.org/zone/tkinter-scrollbar-patterns.htm

On Tuesday 27 September 2005 12:31, Tor Erik Sønvisen wrote:
Hi

I create a canvas that is to big for the default window-size, so it gets
cut to fit...
How can I increase the window-size to make sure the canvas fits?

regards tores


--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/
Sep 27 '05 #3

Tor Erik Sønvisen wrote:
Hi

I create a canvas that is to big for the default window-size, so it gets cut
to fit...
How can I increase the window-size to make sure the canvas fits?

regards tores


root=Tk()
root.minsize(300,300)
root.geometry("500x500")

will limit the window to be at least 300x300, and set it straight away
to 500x500.

Iain

Sep 28 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Fuzzyman | last post: by
2 posts views Thread by Irmen de Jong | last post: by
5 posts views Thread by Sean Berry | last post: by
3 posts views Thread by Matt Hammond | last post: by
4 posts views Thread by arajunk | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.