not pack methon in tkinter

K

kuangye

Hi, all. Why can not i find the pack method in tkinter.

code segment:

from Tkinter import *

root = Tk()
w = Label(root, text="Hello, world!")

w.pack() ###I can not find this method in Label and Label's ancesters
##So where does pack function come from??

root.mainloop()
 
A

alex23

Hi, all.  Why can not i find the pack method in tkinter.
[...]
w.pack() ###I can not find this method in Label and Label's ancesters
##So  where does pack function come from??

Take a look at the Pack class in Tkinter.py, line 1765. It's a
rebinding of the method pack_configure, which is defined on line 1746.

pack = configure = config = pack_configure
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top