Discussion:
Single line read-only wx.TextCtrl is not focusable
Andre Polykanine
2014-10-06 16:51:09 UTC
Permalink
Hello everyone,
I have a series of wx.TextCtrl's. Some of them are wx.TE_READONLY,
some are not.
If I open up the window, my focus is brought to the first textCtrl
(which is read-only). But if I start pressing Tab, all read-only
textCtrl's which are not wx.TE_MULTILINE (including this first one!)
are skipped and are not focusable in any way.
Is this intended behavior? If so, is there a way to make them
focusable besides turning them into multiline controls (which I
actually wouldn't like to)?
Windows 7, WxPython 2.9.
Thanks!
--
With best regards from Ukraine,
Andre
Skype: Francophile
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nathan McCorkle
2014-10-06 21:20:05 UTC
Permalink
One question... if the TextCtrls aren't editable, what purpose would
tabbing into them have? You can't do anything in them... so this may be the
default/native behavior. There may be some custom ways around this, by
catching the TAB in the active control, then having a custom handler (i.e.
event.GetEventObject().GetNextSibling().SetFocus() )

See these for more info and possibly work-arounds or solutions:
https://groups.google.com/forum/#!topic/wxpython-users/qouvE2foCmM
https://groups.google.com/forum/#!msg/wxpython-users/Av_GXxghTUg/j2PBwe2kF6kJ
Post by Andre Polykanine
Hello everyone,
I have a series of wx.TextCtrl's. Some of them are wx.TE_READONLY,
some are not.
If I open up the window, my focus is brought to the first textCtrl
(which is read-only). But if I start pressing Tab, all read-only
textCtrl's which are not wx.TE_MULTILINE (including this first one!)
are skipped and are not focusable in any way.
Is this intended behavior? If so, is there a way to make them
focusable besides turning them into multiline controls (which I
actually wouldn't like to)?
Windows 7, WxPython 2.9.
Thanks!
--
With best regards from Ukraine,
Andre
Skype: Francophile
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Andre Polykanine
2014-10-06 21:30:44 UTC
Permalink
Hello Nathan,

NM> One question... if the TextCtrls aren't editable, what purpose would
NM> tabbing into them have? You can't do anything in them...

for copying values, for example. And for screen reader users who would
be able to easily read their contents.
Thanks!
--
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion

------------ Original message ------------
From: Nathan McCorkle <***@gmail.com>
To: wxpython-***@googlegroups.com
Date created: , 12:20:05 AM
Subject: [wxPython-users] Re: Single line read-only wx.TextCtrl is not focusable



One question... if the TextCtrls aren't editable, what purpose would
tabbing into them have? You can't do anything in them... so this may be the
default/native behavior. There may be some custom ways around this, by
catching the TAB in the active control, then having a custom handler (i.e.
event.GetEventObject().GetNextSibling().SetFocus() )

See these for more info and possibly work-arounds or solutions:
https://groups.google.com/forum/#!topic/wxpython-users/qouvE2foCmM
https://groups.google.com/forum/#!msg/wxpython-users/Av_GXxghTUg/j2PBwe2kF6kJ
Post by Andre Polykanine
Hello everyone,
I have a series of wx.TextCtrl's. Some of them are wx.TE_READONLY,
some are not.
If I open up the window, my focus is brought to the first textCtrl
(which is read-only). But if I start pressing Tab, all read-only
textCtrl's which are not wx.TE_MULTILINE (including this first one!)
are skipped and are not focusable in any way.
Is this intended behavior? If so, is there a way to make them
focusable besides turning them into multiline controls (which I
actually wouldn't like to)?
Windows 7, WxPython 2.9.
Thanks!
--
With best regards from Ukraine,
Andre
Skype: Francophile
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Robin Dunn
2014-10-07 07:02:02 UTC
Permalink
Post by Andre Polykanine
Hello Nathan,
NM> One question... if the TextCtrls aren't editable, what purpose would
NM> tabbing into them have? You can't do anything in them...
for copying values, for example. And for screen reader users who would
be able to easily read their contents.
You might try using one of the wx.TE_RICH styles, that will cause it to
use a different native control.
--
Robin Dunn
Software Craftsman
http://wxPython.org
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...