From 6b1cba13570804f98d1927f6de84daa4bc7ff890 Mon Sep 17 00:00:00 2001 From: Jinhao Date: Tue, 29 Mar 2016 01:22:34 +0800 Subject: [PATCH] enable/disable tab when textbox is switched between single/multi-line --- source/gui/widgets/textbox.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/gui/widgets/textbox.cpp b/source/gui/widgets/textbox.cpp index b6d678af..3567d87e 100644 --- a/source/gui/widgets/textbox.cpp +++ b/source/gui/widgets/textbox.cpp @@ -392,8 +392,12 @@ namespace drawerbase { { internal_scope_guard lock; auto editor = get_drawer_trigger().editor(); - if(editor && editor->multi_lines(ml)) - API::update_window(handle()); + if (editor && editor->multi_lines(ml)) + { + auto wd = handle(); + API::eat_tabstop(wd, ml); //textbox handles the Tab pressing when it is multi-line. + API::update_window(wd); + } return *this; }