diff --git a/docs/changes.txt b/docs/changes.txt index 80b4a01b36..ed5591ac83 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -654,6 +654,7 @@ wxOSX: - Fix printing all pages non-interactively (John Roberts). - Fix custom paper support (tijsv). - Return false from wxSound::Create()/IsOk() if the file doesn't exist. +- Fix scrolling behaviour of wxSearchCtrl (John Roberts). 3.0.2: (released 2014-10-06) diff --git a/src/osx/cocoa/srchctrl.mm b/src/osx/cocoa/srchctrl.mm index 8549d8d944..82313aa40c 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];