Fix behaviour of wxTextCtrl without wxTE_PROCESS_TAB in wxGTK

TAB should be used for navigation by default and only should be inserted
into the control as a literal character if wxTE_PROCESS_TAB is specified
for consistency with wxMSW and because this behaviour is much more
useful by default.

Fix this by calling gtk_text_view_set_accepts_tab() as appropriate for
multiline text controls. For single line ones, the behaviour is
unchanged but it's more reasonable as TAB is always handled as if
wxTE_PROCESS_TAB were not specified and it doesn't seem really useful to
try to support wxTE_PROCESS_TAB for them anyhow, so just document this
limitation.

Also remove the outdated/misleading documentation of this style, notably
don't say that it is required to get char events for TAB presses as
these events are generated both with and without this style in both
wxGTK and wxMSW.

Closes https://github.com/wxWidgets/wxWidgets/pull/704
This commit is contained in:
Vadim Zeitlin
2018-01-30 22:12:22 +01:00
parent 193939453e
commit ad71bbb9ad
3 changed files with 26 additions and 4 deletions

View File

@@ -185,6 +185,7 @@ wxGTK:
- Make wxUIActionSimulator work with GTK+ 3 (Scott Talbert).
- Make wxBORDER_NONE work for wxTextCtrl with GTK+ 3 (Adrien Tétar).
- Handle wxTE_PROCESS_TAB, and its absence, correctly in multiline wxTextCtrl.
- Apply wxTextCtrl::SetDefaultStyle() to user-entered text (Andreas Falkenhahn).
- Implement dynamic auto-completion in wxTextEntry (AliKet).
- Fix wxTextCtrl::GetStyle() with GTK+ 3.