Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Abente Lahaye <tch@sugarlabs.org>2013-01-15 20:42:52 (GMT)
committer Martin Abente Lahaye <tch@sugarlabs.org>2013-01-15 20:42:52 (GMT)
commit0e6c563958ed3762551c557a97fe1319a6547be1 (patch)
tree5b6d36cb57af5b61ed9f6a96945193d5cf644199
parent59d2a06c0e079aa920d3b4f1d81a81e537ea0151 (diff)
gtk containers
-rwxr-xr-x007-gtk-containers/example.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/007-gtk-containers/example.py b/007-gtk-containers/example.py
new file mode 100755
index 0000000..3bdcf71
--- /dev/null
+++ b/007-gtk-containers/example.py
@@ -0,0 +1,31 @@
+#!/usr/bin/python
+import gtk
+
+
+class MyApp():
+
+ def __init__(self):
+ window = gtk.Window()
+ vbox = gtk.VBox()
+ entry = gtk.Entry()
+ hbox = gtk.HBox()
+ button_right = gtk.Button()
+ button_left = gtk.Button()
+
+ window.add(vbox)
+ vbox.add(entry)
+ vbox.add(hbox)
+ hbox.add(button_right)
+ hbox.add(button_left)
+
+ window.show()
+ vbox.show()
+ entry.show()
+ hbox.show()
+ button_right.show()
+ button_left.show()
+
+
+if __name__ == "__main__":
+ my_app = MyApp()
+ gtk.main()