Revision: 14562
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at June 6, 2009 13:12 by vinchkovsky
Initial Code
import gtk
import sys
import pygtk
import gtk.glade
calcFirst = 1
a = 0
b = 0
class App:
"""This is an Hello World GTK application"""
def __init__(self):
#Set the Glade file
self.gladefile = "testccc_4.glade"
self.wTree = gtk.glade.XML(self.gladefile)
dic = {"clicke" : self.equal
, "clicko" : self.addOne
, "clickp" : self.plus}
self.wTree.signal_autoconnect(dic)
def addOne(self, widget):
"""Called when the use wants to add a wine"""
#Cteate the dialog, show it, and store the results
entryx = self.wTree.get_widget("entry1")
entryx.set_text(entryx.get_text()+"1")
def equal(self, widget):
"""Called when the use wants to add a wine"""
#Cteate the dialog, show it, and store the results
entryx = self.wTree.get_widget("entry1")
entryx.set_text(entryx.get_text()+"1")
def aaaas(self):
"""Called when the use wants to add a wine"""
#Cteate the dialog, show it, and store the results
entryx = self.wTree.get_widget("entry1")
entryx.set_text(entryx.get_text()+"1")
if __name__ == "__main__":
app = App()
gtk.main()
Initial URL
Initial Description
Initial Title
stupid netbeans (or I)
Initial Tags
Initial Language
Python