A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/096055.html below:

Tkinter question: disappearing label using the packer?

Tkinter question: disappearing label using the packer? Tkinter question: disappearing label using the packer?Fredrik Lundh fredrik at pythonware.com
Tue Apr 24 13:02:03 EDT 2001
Jake Baker wrote:

> This does not work: (place()ing in a nested Frame object)
>
> =begin=
>
> from Tkinter import *
> root = Tk()
> frame = Frame(root, bg='white')
> frame.pack()
> label = Label(frame, text='Hello world!')
> label.place(x=0)
> root.mainloop()
>
> =end=

if you use pack or grid, the parent widget is resized as
necessary (this is called "geometry propagation").

if you use place, you have to set the size of the parent
yourself.

try giving the frame a size:

    frame = Frame(root, bg='white', width=100, height=100)

Cheers /F



More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4