PyGTK/PyGNOME questions

Robert J. Hansen rjhansen at inav.net
Sun Aug 5 09:28:15 EDT 2001


Howdy, all.  I'm a long-time C/C++ programmer, still fairly new to Python.  
I've got some code I've written using the PyGTK/PyGNOME bindings, and while 
they're reasonably straightforward, I have some questions.  Namely, once I 
use the create_toolbar or create_menus methods, how do I get a reference 
back to an individual button so that I can manipulate it later?

For instance, suppose I have code such as the following:

def maketoolbar(self):
   self.toolbar_menu = [ lots of UIINFO_ITEM_STOCK calls ]

   self.create_toolbar(self.toolbar_menu)

... That creates a toolbar, nice and simple.  But how do I get a reference 
to, say, the first button widget, so that I can set it active or inactive 
depending on what the user is doing in the application?

Thanks in advance, y'all.  :)


-- 
=====
Robert J. Hansen <rjhansen at inav.net>
PGP Fingerprint: 23C8 C3D1 BBE7 C72D D17D  D008 980E 18A7 82C2 392B
=====



More information about the Python-list mailing list