#include "wx/mac/uma.h"
+const short kTextColumnId = 1024 ;
+
// new databrowserbased version
// Listbox item
switch (property)
{
- case 1024:
+ case kTextColumnId:
{
long ref = GetControlReference( browser ) ;
if ( ref )
columnDesc.headerBtnDesc.btnFontStyle.style = normal;
columnDesc.headerBtnDesc.titleString = NULL ; // CFSTR( "" );
- columnDesc.propertyDesc.propertyID = 1024;
+ columnDesc.propertyDesc.propertyID = kTextColumnId;
columnDesc.propertyDesc.propertyType = kDataBrowserTextType;
columnDesc.propertyDesc.propertyFlags =
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
Append( choices[i] ) ;
}
+ SetBestSize(size); // Needed because it is a wxControlWithItems
+
return TRUE;
}
void wxListBox::MacScrollTo( int n )
{
- // TODO implement scrolling
+ UInt32 id = m_idArray[n] ;
+ verify_noerr( ::RevealDataBrowserItem((ControlRef) m_macControl , id , kTextColumnId , kDataBrowserRevealWithoutSelecting ) ) ;
}
void wxListBox::OnSize( wxSizeEvent &event)