Pmw menubutton enable/disable

Camilo Olarte colarte at telesat.com.co
Sun Sep 21 06:07:44 EDT 2003


On Fri, 19 Sep 2003 15:20:57 +0200
Markus von Ehr <markus.vonehr at ipm.fhg.de> wrote:
> is it possible to enable/disable a menubutton?
> My code is like this:
> menuBar = Pmw.MenuBar(root, hull_relief = 'ridge', hull_borderwidth = 1)
> 
> menuBar.pack(side=TOP, fill = 'x')
> menuBar.addmenu('Help', 'help')
> menuBar.addmenuitem('Help', 'command', 'Help About', command = 
> self.About, label = 'About', state=DISABLED)
> 
> 
> 
> now my menubutton is disabled.
> Anyone knows how to enable it?

try this :
menuBar.config(state=ENABLED)

Camilo Olarte





More information about the Python-list mailing list