All pastes #9143 Raw Edit

boo-gtk-oop

public python v1 · immutable
#9143 ·published 2005-04-08 22:18 UTC
rendered paste body
#!/usr/bin/env booinamespace Testimport Systemimport Gtk from "gtk-sharp"class MyWindow(Window):	myLabel as Label	myEntry as Entry	def onClicked():		myLabel.Text = myEntry.Text	def constructor():		super("Hello world")		super.DeleteEvent += Application.Quit		myBox = VBox()		self.Add(myBox)		myLabel = Label("Press the button")		myEntry = Entry()		myButton = Button("Click!")		myButton.Clicked += self.onClicked		myBox.Add(myLabel)		myBox.Add(myEntry)		myBox.Add(myButton)def main():	Application.Init()	window = MyWindow()	window.ShowAll()	Application.Run()main()