From: David Elliott Date: Thu, 14 Feb 2008 22:54:20 +0000 (+0000) Subject: Hack: force a vertical scroller on wxListBox. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/97795793dcb95f523673866175d27e3a63d32584?ds=inline Hack: force a vertical scroller on wxListBox. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/cocoa/listbox.mm b/src/cocoa/listbox.mm index f0a3a0c195..e6d13e33eb 100644 --- a/src/cocoa/listbox.mm +++ b/src/cocoa/listbox.mm @@ -23,12 +23,14 @@ #include "wx/cocoa/string.h" #include "wx/cocoa/autorelease.h" #include "wx/cocoa/ObjcRef.h" +#include "wx/cocoa/private/scrollview.h" #include "wx/cocoa/NSTableDataSource.h" #import #import #import #import +#import IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControlWithItems) BEGIN_EVENT_TABLE(wxListBox, wxListBoxBase) @@ -116,6 +118,9 @@ The listbox contents are sorted in alphabetical order. CocoaCreateNSScrollView(); SetInitialFrameRect(pos,size); + // Force showing of a vertical scrollbar + [m_wxCocoaScrollView->GetNSScrollView() setHasVerticalScroller:YES]; + // Set up extended/multiple selection flags if ((style & wxLB_EXTENDED) || (style & wxLB_MULTIPLE)) //diff is that mult requires shift down for multi selection