Fix scrolling behaviour of wxSearchCtrl under OS X

Make it behave in the same way as single line wxTextCtrls do.

See #17178.
This commit is contained in:
John Roberts
2015-10-03 18:05:48 +02:00
committed by Vadim Zeitlin
parent beffb32d2d
commit bedbdb116d

View File

@@ -204,6 +204,10 @@ wxWidgetImplType* wxWidgetImpl::CreateSearchControl( wxSearchCtrl* wxpeer,
{
NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
wxNSSearchField* v = [[wxNSSearchField alloc] initWithFrame:r];
// Make it behave consistently with the single line wxTextCtrl
[[v cell] setScrollable:YES];
[[v cell] setSendsWholeSearchString:YES];
// per wx default cancel is not shown
[[v cell] setCancelButtonCell:nil];