- columnDesc.propertyDesc.propertyFlags = kDataBrowserPropertyIsMutable | kDataBrowserTableViewSelectionColumn |
- kDataBrowserDefaultPropertyFlags;
- verify_noerr( m_peer->AddListViewColumn( &columnDesc, kDataBrowserListViewAppendColumn) ) ;
-
- // text column
-
- columnDesc.headerBtnDesc.minimumWidth = 0;
- columnDesc.headerBtnDesc.maximumWidth = 10000;
-
- columnDesc.propertyDesc.propertyID = kTextColumnId;
- columnDesc.propertyDesc.propertyType = kDataBrowserTextType;
- columnDesc.propertyDesc.propertyFlags = kDataBrowserTableViewSelectionColumn
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
- | kDataBrowserListViewTypeSelectColumn
-#endif
- ;
-
-
- verify_noerr( m_peer->AddListViewColumn( &columnDesc, kDataBrowserListViewAppendColumn) ) ;
-
- verify_noerr( m_peer->AutoSizeListViewColumns() ) ;
- verify_noerr( m_peer->SetHasScrollBars( false , true ) ) ;
- verify_noerr( m_peer->SetTableViewHiliteStyle( kDataBrowserTableViewFillHilite ) ) ;
- verify_noerr( m_peer->SetListViewHeaderBtnHeight(0 ) ) ;
-
- DataBrowserCallbacks callbacks ;
- callbacks.version = kDataBrowserLatestCallbacks;
- InitDataBrowserCallbacks(&callbacks);
- callbacks.u.v1.itemDataCallback = NewDataBrowserItemDataUPP(ListBoxGetSetItemData);
- callbacks.u.v1.itemNotificationCallback =
-#if TARGET_API_MAC_OSX
- (DataBrowserItemNotificationUPP) NewDataBrowserItemNotificationWithItemUPP(DataBrowserItemNotificationProc) ;
-#else
- NewDataBrowserItemNotificationUPP(DataBrowserItemNotificationProc) ;
-#endif
- m_peer->SetCallbacks( &callbacks);
-
-#if 0
- // shouldn't be necessary anymore under 10.2
- m_peer->SetData( kControlNoPart, kControlDataBrowserIncludesFrameAndFocusTag, (Boolean) false ) ;
- m_peer->SetNeedsFocusRect( true ) ;
-#endif
-
- MacPostControlCreate(pos,size) ;
-
- for ( int i = 0 ; i < n ; i++ )
- {
- Append( choices[i] ) ;
- }
-
- SetBestSize(size); // Needed because it is a wxControlWithItems
-
- return true;
+ columnDesc.propertyDesc.propertyFlags =
+ kDataBrowserPropertyIsMutable
+ | kDataBrowserTableViewSelectionColumn
+ | kDataBrowserDefaultPropertyFlags;
+
+ err = AddColumn( &columnDesc, 0 );
+ verify_noerr( err );