[wx-dev] wxWindowMac::SetFocus() question

Stefan Csomor csomor at advancedconcepts.ch
Wed Jun 27 23:38:22 PDT 2007


Hi Vadim

the issue was that on Mac many controls cannot get the focus which can on other platforms, eg push buttons, checkboxes etc. Now with the current OS X keyboard navigation can be turned on, so that the behavior is similar to other OSes.

before the HIView architecture focus handling was having more problems, now I think the only issue was that we'd get a kill focus event on the old control, even though the focus couldn't be moved, I'll check again ... (MacCanFocus is the call that tries to find out whether that control can be focused at all)

Thanks,

Stefan

> -----Original Message-----
> From: Vadim Zeitlin [mailto:vadim at wxwidgets.org]
> Sent: Donnerstag, 28. Juni 2007 04:49
> To: wx-dev
> Subject: [wx-dev] wxWindowMac::SetFocus() question
>
>  Hello (Stefan),
>
>  Could you please explain me why do we need the test for
> AcceptsFocus() in
> wxWindowMac::SetFocus()? Normally SetFocus() shouldn't be called by
> wx
> itself on a window whose AcceptsFocus() returns false, would anything
> catastrophic happen if the user code calls it without this check?
>
>  And, most importantly, is this supposed to check for whether this
> window
> itself can accept focus or whether this window or one of its children
> can?
> I'm trying to clean up some confusion between these two
> AcceptsFocus()
> interpretations (by introducing a separate AcceptsFocusRecursively()
> method -- any better ideas are welcome...) but I don't really know
> what is
> the code here meant to do.
>
>  Thanks,
> VZ
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-dev-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-dev-help at lists.wxwidgets.org





More information about the wx-dev mailing list