Fix scrolling behaviour of wxSearchCtrl under OS X

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

Closes #17178.
This commit is contained in:
John Roberts
2015-10-03 18:05:48 +02:00
committed by Vadim Zeitlin
parent 6f6bad4702
commit 1c8e5a10ac
2 changed files with 5 additions and 0 deletions

View File

@@ -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)

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