Hi John,

I think this is a bug in wxwidgets, but I'm looking for suggestions
about a workaround.

Essentially, if the application has menu items that change their
state, the change in that state is not detected when the application
is in full screen mode (and the menu is hidden). The same issue is
described here (http://forums.wxwidgets.org/viewtopic.php?f=1&t=32224)
and this ticket may be related too
(http://trac.wxwidgets.org/ticket/4843).

I can see that UPDATE_UI event is triggered in a normal case when an
accelerator key is used (even when the menu is disabled), but it is
NOT triggered when the menu is hidden, which doesn't allow to "fix"
its state. I tried using

frame:UpdateWindowUI(wx.wxUPDATE_UI_RECURSE) and
frame:UpdateWindowUI(wx.wxUPDATE_UI_FROMIDLE)

but I don't see the UPDATE_UI triggered for that particular item. I
also tried your code from wxLua (btw, why did you use it in your
case?):

function UpdateUIMenuItems()
    if frame and frame:GetMenuBar() then
        for n = 0, frame:GetMenuBar():GetMenuCount()-1 do
            frame:GetMenuBar():GetMenu(n):UpdateUI()
        end
    end
end

but it doesn't trigger UPDATE_UI either (in full screen mode). I tried
putting this code in KEY_DOWN and ON_IDLE events with the same result.

Is there a way to force UPDATE_UI on those menu items to make the
accelerator keys work? Is there another workaround?

This is on Win32 using wxwidgets 2.8.7. Thank you.

Paul.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
wxlua-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to