From bedbdb116de13bf03dd20b6864f114fd365609a8 Mon Sep 17 00:00:00 2001 From: John Roberts Date: Sat, 3 Oct 2015 18:05:48 +0200 Subject: [PATCH] Fix scrolling behaviour of wxSearchCtrl under OS X Make it behave in the same way as single line wxTextCtrls do. See #17178. --- src/osx/cocoa/srchctrl.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/osx/cocoa/srchctrl.mm b/src/osx/cocoa/srchctrl.mm index e1e5c585d8..162408426b 100644 --- a/src/osx/cocoa/srchctrl.mm +++ b/src/osx/cocoa/srchctrl.mm @@ -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];