Kirix Support Forums

Menu accelerators not working with wxWebConnect

Please post all general questions, comments, bug reports, and any other wxWebConnect feedback here.

Menu accelerators not working with wxWebConnect

Postby jonmmorgan on Sat Apr 30, 2011 2:07 am

I have noticed that the menu accelerators (e.g. Alt-F for the File menu) do not work when focus is on the web control (though Alt will take you up to the menu, and then you can press 'F'). This behaviour can be seen in the WebConnect test app.

Does anyone have any ideas why this might be the case or what we can do to fix it?
jonmmorgan
Registered User
 
Posts: 94
Joined: Fri May 14, 2010 9:48 am

Re: Menu accelerators not working with wxWebConnect

Postby errno0 on Thu May 05, 2011 11:40 am

first of all thanks for your keyevent patches.

I had the exact problem before. combining with your keyevent patches, I'm working around this by setting focus to a toolbar i have, when 'alt' key is pressed.

register char hook
Code: Select all
EVT_CHAR_HOOK(Frame::OnChar)


and in
Code: Select all
void Frame::OnChar(wxKeyEvent& evt)
{
   if(evt.AltDown())
   {
      m_mainToolbar->SetFocus();
   }
   evt.Skip();
}


not the best solution but it does the job for me.
errno0
Registered User
 
Posts: 1
Joined: Thu May 05, 2011 11:32 am

Re: Menu accelerators not working with wxWebConnect

Postby jonmmorgan on Fri May 06, 2011 9:01 am

Thanks for that. As you say, it's not the best solution but it mostly does the job (I find that the WebConnect window loses focus if I use "Alt" to activate the menu bar, then press Alt again or Esc to cancel that). However, it does make the menu accelerators work so I will probably stick with it (unless I happen to think of a better solution in wxWebConnect).
jonmmorgan
Registered User
 
Posts: 94
Joined: Fri May 14, 2010 9:48 am

Return to wxWebConnect Questions, Thoughts & Feedback