python - tkinter window title when using class to hold widgets -


i'm trying add window title tkinter application. .title('mytitle') seems work fine on simple examples, not i'm encapsulating widgets in class.

here's simple example using "hello, again" tutorial www.pythonware.com/library/tkinter/introduction/

why not work? thanks!

from tkinter import *  class app:      def __init__(self, master):          frame = frame(master)         frame.pack()          self.button = button(frame, text="quit", fg="red", command=frame.quit)         self.button.pack(side=left)          self.hi_there = button(frame, text="hello", command=self.say_hi)         self.hi_there.pack(side=left)      def say_hi(self):         print "hi there, everyone!"  root = tk()  app = app(root)  root.title('blob')  root.mainloop() 

as per marcin kowalczyk's comment, window size small show title. curiously, without widgets window expanded show title, hence assumption wasn't there.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -