Hot-Keys in wxHtmlWindow

OK. So I'd like to do this, to set the parent panels to use
the hotkeys of the child panels. I figure that the easiest
way to do this is to add one extra function to call when I
add a child panel to a parent. This function would go through
the entries in the child panel's accelerator table (as I understand
it the hotkeys that I set on the buttons go into an accelerator
table that I never worry about), and for each entry, it would
propagate it up the hierarchy of panels and windows, adding entries
in each accelerator table as it goes, whenever the corresponding
key code was not already in the accelerator table at that level.

Anyhow, that won't work. There is no way (in the docs anyway) to ask
a window for its accelerator table, no way to ask an accelerator table
which keycodes are set, and no way to add an entry to an accelerator
table. Is there any particular reason other than no one having time to
do it yet why these functions are missing?

I suppose that I really just need to have the table at the top level
of the hirarchy (right below my main frame), so I can accumulate
my own array of entries to re-assign the entire accelerator table
as needed. This might not be too bad. Maybe just one extra call
to set an entry in my table for every hotkey that I set, then one
extra call to set the accelerator table when the window is displayed
or changed.

Al

achrist@easystreet.com wrote:

Anyhow, that won't work. There is no way (in the docs anyway) to ask
a window for its accelerator table, no way to ask an accelerator table
which keycodes are set, and no way to add an entry to an accelerator
table. Is there any particular reason other than no one having time to
do it yet why these functions are missing?

I don't know.

I suppose that I really just need to have the table at the top level
of the hirarchy (right below my main frame), so I can accumulate
my own array of entries to re-assign the entire accelerator table
as needed. This might not be too bad. Maybe just one extra call
to set an entry in my table for every hotkey that I set, then one
extra call to set the accelerator table when the window is displayed
or changed.

Yes, this is what I was thinking. The child panels need to be proactive about it and register their own accelerators with whichever window is going to be managing the accelerator table.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!