Enabling/disabling Pmw menubar items

Martyn Quick mrq at for.mat.bham.ac.uk
Fri Oct 26 09:01:58 EDT 2001


Dear All,

I've been creating a menubar for an application using the Pmw MenuBar
class.  For example, I have something like the following:

menubar = self.createcomponent(
    'menubar', (), None, Pmw.MenuBar, (self.interior(),)
menubar.pack()
menubar.addmenu('Menu', 'A dummy menu')
menubar.addmenuitem(
    'Menu', 'command', 'A non-existent command',
    command=dummy_fucntion, label='Something', state='disabled')

This has the effect that my menu item is disabled.  But how do I enable it
again?   (I can't seem to find this out on the Pmw website!)

Thanks,

Martyn

--------------------------------------------------------
Dr. Martyn Quick  (Lecturer in Pure Mathematics)
University of Birmingham, Edgbaston, Birmingham, UK.
http://www.mat.bham.ac.uk/M.R.Quick/






More information about the Python-list mailing list