Hi all,
I'm trying to study gdl, using some sample programs. While the dock
generally works, I cannot minimize them, since they disappear...
see attached code.
What am I doing wrong?
#!/usr/bin/python
import pygtk
pygtk.require("2.0")
import gtk, gdl
class DockExample:
#main window
win = None
def __init__(self):
self.win = gtk.Window()
self.win.connect("destroy", gtk.main_quit)
#Dock
self.dock = gdl.Dock()
self.dock.show_all()
#DockLayout
self.layout = gdl.DockLayout(self.dock)
#DockBar
self.dockbar = gdl.DockBar(self.dock)
self.dockbar.show_all()
#item 1 a button
self.item1 = gdl.DockItem("item1", "Item1", gtk.STOCK_OK, gdl.DOCK_ITEM_BEH_NORMAL)
self.item1.add(gtk.Button("Button 1"))
self.item1.show_all()
self.dock.add_item(self.item1, gdl.DOCK_RIGHT)
#item 2 a button
self.item2 = gdl.DockItem("item2", "Item2", gtk.STOCK_YES,gdl.DOCK_ITEM_BEH_NORMAL)
self.item2.add(gtk.Button("Button 2 "))
self.item2.show_all()
self.dock.add_item(self.item2, gdl.DOCK_BOTTOM)
self.win.add(self.dock)
self.win.set_size_request(300, 250)
self.win.show_all()
if __name__ == "__main__":
dockExample = DockExample()
gtk.main()_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/