|
Getting text entry to print: msg#00123gnome.gtk+.python
hello. i have been using th wonderul pygtk tutorial and have really enjoyed learning gui My problem is that I cant seem to pass a text_entry afet I get it. Here is my program. What I want to do is be able to manipulate data that is entereed into a text_entry widget Thank you for your help #!/usr/bin/python2.2 #This is the inital start # what is needed import pygtk pygtk.require('2.0') import gtk class Window: def printIt(self, widget, entryText): print "you typed %s" % entryText def hello(self,widget,data = None): print "Hello" def quit(self,widget, data = None): gtk.main_quit() def __init__(self): self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.set_border_width(20) self.window.show() self.box2=gtk.VBox(gtk.FALSE,0) self.window.add(self.box2) self.button2 = gtk.Button("Quit") self.button2.connect("clicked",self.quit) self.box2.pack_start(self.button2, gtk.TRUE, gtk.TRUE, 0) entry = gtk.Entry(max=0) entry.show() self.box2.pack_start(entry, gtk.TRUE, gtk.TRUE, 0) self.printButton = gtk.Button("Print it?") self.printButton.connect("clicked", self.printIt, entry.get_text()) self.box2.pack_start(self.printButton, gtk.TRUE, gtk.TRUE, 0) self.printButton.show() self.button2.show() self.box2.show() def main(self): gtk.main() window = Window() window.main() __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com _______________________________________________ pygtk mailing list pygtk@xxxxxxxxxx http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [omniORB] Re: Conflicting omniORBpy and PyORBit: 00123, James Henstridge |
|---|---|
| Next by Date: | Re: Getting text entry to print: 00123, Tim Evans |
| Previous by Thread: | cooperative threads with generatorsi: 00123, Stephen Kennedy |
| Next by Thread: | Re: Getting text entry to print: 00123, Tim Evans |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |