- DataBrowserListViewColumnDesc columnDesc ;
- columnDesc.headerBtnDesc.titleOffset = 0;
- columnDesc.headerBtnDesc.version = kDataBrowserListViewLatestHeaderDesc;
-
- columnDesc.headerBtnDesc.btnFontStyle.flags =
- kControlUseFontMask | kControlUseJustMask;
-
- columnDesc.headerBtnDesc.btnContentInfo.contentType = kControlNoContent;
- columnDesc.propertyDesc.propertyType = kDataBrowserTextType;
- columnDesc.headerBtnDesc.btnFontStyle.just = teFlushDefault;
- columnDesc.headerBtnDesc.minimumWidth = 0;
- columnDesc.headerBtnDesc.maximumWidth = 10000;
-
- columnDesc.headerBtnDesc.btnFontStyle.font = kControlFontViewSystemFont;
- columnDesc.headerBtnDesc.btnFontStyle.style = normal;
- columnDesc.headerBtnDesc.titleString = NULL ; // CFSTR( "" );
-
- columnDesc.propertyDesc.propertyID = 1024;
- columnDesc.propertyDesc.propertyType = kDataBrowserTextType;
- columnDesc.propertyDesc.propertyFlags =
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
- kDataBrowserListViewTypeSelectColumn |
-#endif
- kDataBrowserTableViewSelectionColumn ;
-
-
- verify_noerr(::AddDataBrowserListViewColumn(browser, &columnDesc, kDataBrowserListViewAppendColumn) ) ;
- verify_noerr(::AutoSizeDataBrowserListViewColumns( browser ) ) ;
- verify_noerr(::SetDataBrowserHasScrollBars( browser , false , true ) ) ;
- verify_noerr(::SetDataBrowserTableViewHiliteStyle( browser, kDataBrowserTableViewFillHilite ) ) ;
- verify_noerr(::SetDataBrowserListViewHeaderBtnHeight( browser , 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
- SetDataBrowserCallbacks(browser, &callbacks);
-
- MacPostControlCreate(pos,size) ;
-
- for ( int i = 0 ; i < n ; i++ )
- {
- Append( choices[i] ) ;
- }
-
- SetBestSize(size); // Needed because it is a wxControlWithItems
-
- return TRUE;