wxMac - Tab and Selection in wxTextCtrl (again)

Vadim Zeitlin vadim at wxwidgets.org
Wed Oct 3 14:51:54 PDT 2007


[I think this would be more suitable for wx-dev and you might find more
 people to answer this there]

On Wed, 3 Oct 2007 18:03:44 +0200 Yoav Gonen <YoavG at HumanEyes.com> wrote:

YG> After a bit of debugging it seems to me that the wxTextCtrl "remembers"
YG> its last selection, so if you tab out of it and then into it again, the
YG> last text selected would be selected again.

 Is this done intentionally by wxMac? If not, i.e. if it's the behaviour
implemented in the native text control widget itself, I don't think we
should override it.

YG> BTW, this is what happens in iTunes and Xcode.

 But are there any (native) applications which exhibit the same behaviour
as wx?

YG> Does anybody have any suggestions?

 I don't know the specifics of Mac text controls focus handling but
generally speaking wx applications should behave in the same way as the
other native programs. So if the native text control selects all text when
you tab into it, so should do we. If you use Xcode you might consider
creating a tiny window with a couple of controls, including a text one, in
the interface builder and see how does it behave (without any code
interfering with focus events at all).

YG> I don't mind fixing and submitting a patch

 Thanks!
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/





More information about the wx-users mailing list