Пример #1
0
from Tkinter import *
from gui7 import HelloPackage                  # or get from gui7c--__getattr__ added

frm = Frame()
frm.pack()
Label(frm, text='hello').pack()

part = HelloPackage(frm)
part.pack(side=RIGHT)                          # fails! -- need part.top.pack(side=RIGHT)
frm.mainloop()
Пример #2
0
from tkinter import *
import tkinter
from gui7 import HelloPackage

# chamando tk, obs: tem que chamar tk para funcionar/ nao livro nao eh chamado
root = Tk()

frame = Frame(root)
frame.pack()

Label(frame, text='hello/ ola').pack()

part = HelloPackage(frame)

root.mainloop()  # <------------- mainloop aqui tambem
Пример #3
0
from tkinter import *
from gui7 import HelloPackage

frm = Frame()
frm.pack()
Label(frm, text='Hello').pack()

part = HelloPackage(frm)
part.pack(
    side=RIGHT
)  # fail -- need part.top.pack(side=RIGHT); use 'from gui7c import HelloPackage' instead
frm.mainloop()
Пример #4
0
from tkinter import *
from gui7 import HelloPackage

frm = Frame()
frm.pack()
Label(frm, text='hello').pack()

part = HelloPackage(frm)
part.pack(side=RIGHT)
frm.mainloop()

Пример #5
0
from Tkinter import *
from gui7 import HelloPackage      # or get from gui7c--__getattr__ added
     
frm = Frame()
frm.pack()
Label(frm, text='hello').pack()
     
part = HelloPackage(frm)
part.pack(side=RIGHT)              # fails!--need part.top.pack(side=RIGHT) 
frm.mainloop()
Пример #6
0
# e.g. 7-25

from tkinter import *
from gui7 import HelloPackage

frm = Frame()
frm.pack()
Label(frm, text='hello').pack()

part = HelloPackage(frm)
part.top.pack(side=RIGHT)
frm.mainloop()