iconSpacing = 0;
// Note that we do not call GetClientSize() here but
- // GetSize() and substract the border size for sunken
+ // GetSize() and subtract the border size for sunken
// borders manually. This is technically incorrect,
// but we need to know the client area's size WITHOUT
// scrollbars here. Since we don't know if there are
wxListLineData *line = new wxListLineData(this);
- line->SetItem( 0, item );
+ line->SetItem( item.m_col, item );
m_lines.Insert( line, id );
m_mainWin = new wxListMainWindow( this, wxID_ANY, wxPoint(0,0), size, style );
-#if defined( __WXMAC__ ) && __WXMAC_CARBON__
+#ifdef __WXMAC_CARBON__
// Human Interface Guidelines ask us for a special font in this case
if ( GetWindowVariant() == wxWINDOW_VARIANT_NORMAL )
{
return true;
}
-#if WXWIN_COMPATIBILITY_2_4
-bool wxGenericListCtrl::SetItemImage( long item, int image, int WXUNUSED(selImage) )
-{
- wxListItem info;
- info.m_image = image;
- info.m_mask = wxLIST_MASK_IMAGE;
- info.m_itemId = item;
- m_mainWin->SetItem( info );
- return true;
-}
-#endif
-
-bool wxGenericListCtrl::SetItemImage( long item, int image )
+bool
+wxGenericListCtrl::SetItemImage( long item, int image, int WXUNUSED(selImage) )
{
wxListItem info;
info.m_image = image;
int wxGenericListCtrl::OnGetItemImage(long WXUNUSED(item)) const
{
- // same as above
- wxFAIL_MSG( _T("wxGenericListCtrl::OnGetItemImage not supposed to be called") );
-
+ wxCHECK_MSG(!GetImageList(wxIMAGE_LIST_SMALL),
+ -1,
+ wxT("List control has an image list, OnGetItemImage should be overridden."));
return -1;
}