I'm trying my first go round with gygtk. I can not seem to figure out
how to disable individual elements within the tool bar.
I build the toolbar as such.
def buildPackageToolBar(self):
toolbar = gtk.Toolbar()
icon = gtk.Image()
icon.set_from_pixbuf(self.icons.icons["not_installed_install"])
detailsButton = toolbar.append_item(
"Install",
"Install Package",
"Private",
icon,
self.aEvent,
"install")
toolbar.append_space()
icon = gtk.Image()
icon.set_from_pixbuf(self.icons.icons["installed_hold"])
detailsButton = toolbar.append_item(
"Hold",
"Hold Package",
"Private",
icon,
self.aEvent,
"hold")
toolbar.append_space()
icon = gtk.Image()
icon.set_from_pixbuf(self.icons.icons["installed_update"])
detailsButton = toolbar.append_item(
"Update",
"Update Package",
"Private",
icon,
self.aEvent,
"update")
toolbar.append_space()
icon = gtk.Image()
icon.set_from_pixbuf(self.icons.icons["installed_remove"])
detailsButton = toolbar.append_item(
"Remove",
"Remove Package",
"Private",
icon,
self.aEvent,
"remove")
toolbar.set_border_width(5)
print toolbar.get_children()
return toolbar
when I run the above the print statement responds with
[<gtk.Bin object (GtkToolButton) at 0xf49bb98c>, <gtk.Bin object
(GtkSeparatorToolItem) at 0xf49bb9b4>, <gtk.Bin object (GtkToolButton)
at 0xf49bb9dc>, <gtk.Bin object (GtkSeparatorToolItem) at 0xf49bba04>,
<gtk.Bin object (GtkToolButton) at 0xf49bba2c>, <gtk.Bin object
(GtkSeparatorToolItem) at 0xf49bba54>, <gtk.Bin object (GtkToolButton)
at 0xf49bba7c>]
I assume that I want to do something like toolbar[0].set_disabled()
but...I can't find any reference material about a gtk.ToolButton.
Am I missing something?
Thanks,
Dave Farning
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/