Focus vs. Activation

Nicholas Bastin nbastin at mac.com
Wed Aug 1 11:51:40 PDT 2007


On 1 Aug , 2007, at 14:45 , Ole Nielsby wrote:

>
> crjjrc <crjjrc at gmail.com> wrote:
>
>> What exactly is the difference between a focus event and an  
>> activation
>> event?  I'm not getting a clear understanding from the event handle
>> overview in the documentation.
>
> As you can see from the methods
>
>     wxWindow::SetFocus
>     wxTopLevelWindow::IsActive,
>
> being active is a wxTopLevelWindow thing while individual widgets on
> the active top level window (or most of them) can have the focus.
>
> In wxWidgets, when a top level window is activated, it automatically
> gives the focus to the one of its controls that had it when the window
> was last active, so you generally don't need to bother about these
> events. You can override the SetFocus method if you need special
> behaviour for your own custom widgets.

Some window managers will allow a window to be active without having  
the focus.

--
Nick




More information about the wx-users mailing list