From 014f04b4378dfa267cc9b6bbb8eacfc95dcfa19e Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 5 Nov 2019 22:42:18 +0100 Subject: [PATCH] show as many items as possible on macOS 10.13+ on these systems scrollbars on comboboxes are not always shown, even if the system is configured to do so, in these cases show all possible to avoid the impression of a limited subset see https://github.com/wxWidgets/wxWidgets/pull/1534/files --- src/osx/cocoa/combobox.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/osx/cocoa/combobox.mm b/src/osx/cocoa/combobox.mm index 71aa165d44..56e6602a62 100644 --- a/src/osx/cocoa/combobox.mm +++ b/src/osx/cocoa/combobox.mm @@ -20,6 +20,7 @@ #include "wx/dcclient.h" #endif +#include "wx/osx/private/available.h" #include "wx/osx/cocoa/private/textimpl.h" // work in progress @@ -347,7 +348,10 @@ wxWidgetImplType* wxWidgetImpl::CreateComboBox( wxComboBox* wxpeer, { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSComboBox* v = [[wxNSComboBox alloc] initWithFrame:r]; - [v setNumberOfVisibleItems:13]; + if (WX_IS_MACOS_AVAILABLE(10, 13)) + [v setNumberOfVisibleItems:999]; + else + [v setNumberOfVisibleItems:13]; if (style & wxCB_READONLY) [v setEditable:NO]; wxNSComboBoxControl* c = new wxNSComboBoxControl( wxpeer, v );