473,322 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Prevent Tkinter Canvas from resizing

Using Tkinter, I have a Canvas with vertical Scrollbar attached. At
runtime, I dynamically create Checkboxes on the Canvas, each one on a
different row. When I add a lot of Checkboxes, instead of the
scrollbar kicking in, the Canvas resizes and subsequently, my
Application window resizes such that it is larger than my monitor.

Can I prevent the Canvas from resizing when I am creating widgets on it
at runtime? I want to use the scrollbars when there are more
Checkboxes than will fit on the visible Canvas. Is this possible?
Thanks for any help.

Jan 20 '06 #1
1 2941
Eric Wong wrote:
Using Tkinter, I have a Canvas with vertical Scrollbar attached. At
runtime, I dynamically create Checkboxes on the Canvas, each one on a
different row. When I add a lot of Checkboxes, instead of the
scrollbar kicking in, the Canvas resizes and subsequently, my
Application window resizes such that it is larger than my monitor.

Can I prevent the Canvas from resizing when I am creating widgets on it
at runtime? I want to use the scrollbars when there are more
Checkboxes than will fit on the visible Canvas. Is this possible?


if you want scrolling widgets, you need to create the widgets *in* the
canvas (using create_window), rather than on top of the canvas (using
the canvas as the master).

</F>

Jan 20 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Frank Stajano | last post by:
The compact form of pack behaves differently (and I believe incorrectly) compared to the long form. The following two scripts demonstrate it, at least on this interpreter: Python 2.3.2 (#1, Oct 9...
2
by: mksql | last post by:
New to Tkinter. Initially, I had some code that was executing button commands at creation, rather than waiting for user action. Some research here gave me a solution, but I am not sure why the...
1
by: Elaine Jackson | last post by:
Newbie. Playing with the 'turtle' module and wondering if there's a way to save the graphics you make with it. The documentation itself has nothing to say about this, nor (as far as I can tell)...
1
by: syed_saqib_ali | last post by:
Please take a look at and run the code snippet shown below. It creates a canvas with vertical & Horizontal scroll-bars. If you shrink the window to smaller than the area of the canvas, the...
2
by: Gordon Airporte | last post by:
I'm trying to get my canvas to resize to fill its frame within a window, but I can't figure out how to handle the callback data from the window's <Configure> properly. It has very strange behavior...
0
by: syed_saqib_ali | last post by:
Below is a simple code snippet showing a Tkinter Window bearing a canvas and 2 connected scrollbars (Vertical & Horizontal). Works fine. When you shrink/resize the window the scrollbars adjust...
5
by: Dean Allen Provins | last post by:
I need to determine the size of a canvas while the process is running. Does anyone know of a technique that will let me do that? Thanks, Dean
4
by: Davy | last post by:
Hi all, I have written a simple Tkinter program, that is draw a rectangle in a canvas, when I press Up key, the rectangle move up. But the program seems work not properly? My environment is...
3
by: joshdw4 | last post by:
I hate to do this, but I've thoroughly exhausted google search. Yes, it's that pesky root window and I have tried withdraw to no avail. I'm assuming this is because of the methods I'm using. I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.