From 7c0d4f211d1a0ea5e70c2a9d9b5bd7177b4a80ab Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Thu, 3 Aug 2017 00:11:26 +0200 Subject: [PATCH] Make wxTextCtrl with no wxTE_MULTILINE style really single-line (wxOSX) Under wxGTK wrapping for single-line controls is explictly disabled (see wxTextCtrl::GTKSetWrapMode), under wxMSW wrapping is not supported, so for the sake of consistency also under wxOSX single-line control shouldn't support wrapping and vertical scrolling. Closes #12693. --- src/osx/cocoa/textctrl.mm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/osx/cocoa/textctrl.mm b/src/osx/cocoa/textctrl.mm index 516d0ac637..aed884cdb8 100644 --- a/src/osx/cocoa/textctrl.mm +++ b/src/osx/cocoa/textctrl.mm @@ -1398,10 +1398,7 @@ wxWidgetImplType* wxWidgetImpl::CreateTextControl( wxTextCtrl* wxpeer, } NSTextFieldCell* cell = [v cell]; - [cell setScrollable:YES]; - // TODO: Remove if we definitely are sure, it's not needed - // as setting scrolling to yes, should turn off any wrapping - // [cell setLineBreakMode:NSLineBreakByClipping]; + [cell setUsesSingleLineMode:YES]; c = new wxNSTextFieldControl( wxpeer, wxpeer, v );