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.
This commit is contained in:
Artur Wieczorek 2017-08-03 00:11:26 +02:00
parent e426411e34
commit 7c0d4f211d

View File

@ -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 );