Pmw menubutton enable/disable

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Markus von Ehr

    Pmw menubutton enable/disable

    Hi,

    is it possible to enable/disable a menubutton?

    My code is like this:

    menuBar = Pmw.MenuBar(roo t, hull_relief = 'ridge', hull_borderwidt h = 1)

    menuBar.pack(si de=TOP, fill = 'x')
    menuBar.addmenu ('Help', 'help')
    menuBar.addmenu item('Help', 'command', 'Help About', command =
    self.About, label = 'About', state=DISABLED)



    now my menubutton is disabled.
    Anyone knows how to enable it?

    Thanks,

    Markus

  • Camilo Olarte

    #2
    Re: Pmw menubutton enable/disable

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

    try this :
    menuBar.config( state=ENABLED)

    Camilo Olarte

    Comment

    Working...