How can I change size of GUI?

Muddy Coder cosmo_general at yahoo.com
Mon Apr 6 18:29:41 EDT 2009


Hi Folks,

I copied code from book:

class ScrolledText(Frame):
	def __init__(self, parent=None, text='', file=None):
		Frame.__init__(self, parent)
		self.pack(expand=YES, fill=BOTH)
		self.makeWidgets()
		self.settext(text, file)
	def makeWidgets(self):
		sbar = Scrollbar(self)
		text = Text(self, relief=SUNKEN, width=120)
		sbar.config(command=text.yview)
		text.config(yscrollcommand=sbar.set)
		sbar.pack(side=RIGHT, fill=Y)
		text.pack(side=LEFT, expand=YES, fill=BOTH)
		self.text = text

It works, of course. But, the GUI is small, and I want to enlarge it.
I tried to add in options of width=120 for Text(), but it did not
work. Can somebody drop me a couple of lines for help? Thanks!

Muddy Coder



More information about the Python-list mailing list