added horizontal scrollbars to listboxes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-01-17 10:35:09 +00:00
parent 762f58ab21
commit 796fbddc3b
4 changed files with 172 additions and 6 deletions

View File

@@ -181,7 +181,9 @@ static pascal void wxMacListDefinition( short message, Boolean isSelected, Rect
}
extern "C" void MacDrawStringCell(Rect *cellRect, Cell lCell, ListHandle theList, long refCon) ;
// resources ldef ids
const short kwxMacListWithVerticalScrollbar = 128 ;
const short kwxMacListWithVerticalAndHorizontalScrollbar = 129 ;
// ============================================================================
// list box control implementation
@@ -238,7 +240,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
Size asize;
CreateListBoxControl( MAC_WXHWND(parent->MacGetRootWindow()), &bounds, false, 0, 1, false, true,
CreateListBoxControl( MAC_WXHWND(parent->MacGetRootWindow()), &bounds, false, 0, 1, (style & wxLB_HSCROLL), true,
kwxMacListItemHeight, kwxMacListItemHeight, false, &listDef, (ControlRef *)&m_macControl );
GetControlData( (ControlHandle) m_macControl, kControlNoPart, kControlListBoxListHandleTag,
@@ -252,8 +254,8 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
long result ;
wxStAppResource resload ;
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false ,
kwxMacListWithVerticalScrollbar , 0 , 0,
kControlListBoxProc , (long) this ) ;
(style & wxLB_HSCROLL) ? kwxMacListWithVerticalAndHorizontalScrollbar : kwxMacListWithVerticalScrollbar ,
0 , 0, kControlListBoxProc , (long) this ) ;
::GetControlData( (ControlHandle) m_macControl , kControlNoPart , kControlListBoxListHandleTag ,
sizeof( ListHandle ) , (char*) &m_macList , &result ) ;