Ed Leafe wrote:
> On Jan 2, 2011, at 8:29 PM, OKB (not okblacke) wrote:
>
>> I can't seem to catch a KeyDown event (or any KeyEvents
>> that I've
>> tried). I have a class that subclasses dPanel, and in that
>> class's afterInit I do:
>>
>> self.bindEvent(dabo.dEvents.KeyDown, self.keyDown)
>>
>> . . . my keyDown method is still not called when I press keys. Is
>> there something else I need to do? I also tried doing
>> self.Form.bindEvent instead, but it didn't work either.
>
> That's the right way to bind events, but I'm not sure that
> panels can receive key events. I believe that only controls
> that can receive focus get key events.
Ah, I now tried doing self.Application.bindEvent instead, and that
worked. However, it's not ideal for my purpose, since I assume it's
setting it globally for the app.
The deal is that I have a dPageFrameNoTabs where, based on stuff
the user does, focus changes to a new panel. The individual pages are
dPanels. The page-frame occupies the entire form, so the entirety of
the interface the user sees is always a single panel of the form. So is
there a way to bind a KeyEvent in such a way that it is caught only when
a certain panel is chosen? Or would I have to bind it on the App and
then manually check what panel is selected?
Thanks,
--
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is
no path, and leave a trail."
--author unknown
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]