[lazarus] Menu shortcut keys

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Mar 25 10:42:46 EST 2003


On 22 Mar 2003 15:28:52 -0600
Tony Maro <tony at maro.net> wrote:

> I've implemented menu shortcut keys, but they don't always work.  It
> appears to have to do with what component is currently focused.  The
> problem is that with my TNotebook control doing weird GTK focusing
> problems, often times NOTHING has focus.

- The focussing in gtk is dominated by the windowmanagers. You can't
"control" the focus as under win32. You can only give "suggestions". 
- The focus messages are not sent in the same order as under win32. 
- The focus is locked during many gtk calls.

That's the reason why you get a lot of "NOTHING has focus".

I improved the focussing a little bit, so that less focus messages are sent
and focussing became a little bit better. 

 
> I also noticed that if I trap the OnKeyDown event for processing some
> keys, the menu shortcuts entirely stop working when that control has
> focus, even if I don't handle a key related to that shortcut.

Can you give an example?

Mattias






More information about the Lazarus mailing list