#1136: Enabled property in context menu not working
----------------------+-----------------------------------------------------
 Reporter:  nate      |       Owner:  somebody
     Type:  defect    |      Status:  new     
 Priority:  critical  |   Milestone:  0.8.3   
Component:  ui        |     Version:  0.8.2   
 Keywords:            |  
----------------------+-----------------------------------------------------
 I have problems with the Enabled property on a menuitem in a popup.  I
 created the script below to test and the enable doesn't work.  Can someone
 verify?


 {{{
 import dabo
 dabo.ui.loadUI('wx')

 class mainForm(dabo.ui.dForm):
        def afterInit(self):
                self.bindEvent(dabo.dEvents.MouseRightClick,
 self.onRightClick)

        def initProperties(self):
                self.Size=(300,300)

        def onRightClick(self, evt):
                popupMenu = dabo.ui.dMenu(self)
                popupMenu.append("Menu1", OnHit=self.onMenu)
                popupMenu.append("Menu2", OnHit=self.onMenu, Enabled=False)

                self.showContextMenu(popupMenu)

        def onMenu(self, evt):
                print "Menu Hit"

 app = dabo.dApp()
 app.MainFormClass = mainForm
 app.start()
 }}}

 Version information:
 [[BR]]
 [[BR]]Platform: Win
 [[BR]]Python Version: 2.5.1 on win32
 [[BR]]Dabo Version: Version 0.8.3; Revision 3900
 [[BR]]UI Version: 2.8.7.1 on wxMSW

 Paul had this to say:

 Bind to dabo.dEvents.ContextMenu instead of RightClick. This gets your
 menu working on Mac, too.

 But that doesn't solve the problem. Here's my observed behavior:
 [[BR]]
 [[BR]]Mac: menu2 is disabled
 [[BR]]Linux: menu2 is enabled
 [[BR]]Win: menu2 is enabled

-- 
Ticket URL: <http://trac.dabodev.com/ticket/1136>
Dabo Trac <http://trac.dabodev.com>
Trac Page for Dabo


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to