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
This commit is contained in:
Vadim Zeitlin 2012-12-28 16:03:20 +00:00
parent f69306fe61
commit 98c9096992

View File

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