Enabled property for MenuItem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Enabled property for MenuItem

Brendan Simon (eTRIX)
There doesn't appear to be an `Enabled` property for wx.MenuItem

I have to call `mymenuitem.Enable( en )`, but I'd like to write `mymenuitem.Enabled = en`

i.e. similar to what I can do with wx.Button (or anything derived from wx.Window)

Is that intentional or is it just missing?

Brendan

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Enabled property for MenuItem

Robin Dunn

On Wednesday, October 31, 2018 at 7:56:59 PM UTC-7, Brendan Simon wrote:
There doesn't appear to be an `Enabled` property for wx.MenuItem

I have to call `mymenuitem.Enable( en )`, but I'd like to write `mymenuitem.Enabled = en`

i.e. similar to what I can do with wx.Button (or anything derived from wx.Window)

Is that intentional or is it just missing?


Just missing. The tweaker code automatically adds properties for appropriate methods starting with Get or Set, but it has to be done manually for things like IsEnabled/Enable. I'll add it.

--
Robin


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.