Xojo event model

I want to handle some keydown events at the window level. The window contains a variety of controls, some of which implement a keydown event (such as listbox). Do I have to add dummy keydown handlers to all such controls (which return false) so that the event is available to the window? If there are several controls on a window which can have a keydown handler, which one will receive the event?

If I use a pagepanel do I have to worry about controls on the non-active pages receiving events?

Is there a description somewhere of the Xojo event model and how events propagate?


Some controls handle it for you automatically, like TextField, TextArea, Combobox, etc if they have the focus. If you want some keydown handling if they have the focus then you’ll you have to implement their KeyDown events and handle it manually there as well as at the Window level. It can get tricky with controls that do things on their own.

Other controls, like Listbox, won’t process the KeyDown unless you implement it yourself. And keep in mind that Mac will act differently than Windows and Linux because not all of its controls will respond to keydown automatically. Unless, of course, you have accessibility turned on. Test early, test often, on all target platforms.