From: Vadim Zeitlin Date: Fri, 28 Dec 2012 16:03:20 +0000 (+0000) Subject: Don't assume that wxTE_RICH(2) implies wxTE_MULTILINE for wxTextCtrl in wxOSX. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/98c9096992dfc5e8149d0bf1b7d0de51a7979075 Don't assume that wxTE_RICH(2) implies wxTE_MULTILINE for wxTextCtrl in wxOSX. Under MSW single line text controls can still use these styles, so don't assume that the control should be made multi-line just because one of them is specified. This fixes the appearance of the in-place text control in wxGridCellTextEditor which is created with wxTE_RICH2 style to work around some wxMSW problem. Closes #11681. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/cocoa/textctrl.mm b/src/osx/cocoa/textctrl.mm index 5b7fc73310..3099d4a408 100644 --- a/src/osx/cocoa/textctrl.mm +++ b/src/osx/cocoa/textctrl.mm @@ -988,7 +988,7 @@ wxWidgetImplType* wxWidgetImpl::CreateTextControl( wxTextCtrl* wxpeer, NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxWidgetCocoaImpl* c = NULL; - if ( style & wxTE_MULTILINE || style & wxTE_RICH || style & wxTE_RICH2 ) + if ( style & wxTE_MULTILINE ) { wxNSTextScrollView* v = nil; v = [[wxNSTextScrollView alloc] initWithFrame:r];