Patch from Tim Kosse to add supoprt for wxListCtrl::OnGetItemColumnImage

which enables images to be specified for columns other than zero in
virtual list controls.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-01-25 23:29:02 +00:00
parent 0a6f92b85c
commit 208458a7f5
9 changed files with 87 additions and 10 deletions

View File

@@ -2226,9 +2226,9 @@ void wxListMainWindow::CacheLineData(size_t line)
for ( size_t col = 0; col < countCol; col++ )
{
ld->SetText(col, listctrl->OnGetItemText(line, col));
ld->SetImage(listctrl->OnGetItemColumnImage(line, col));
}
ld->SetImage(listctrl->OnGetItemImage(line));
ld->SetAttr(listctrl->OnGetItemAttr(line));
}
@@ -5470,11 +5470,18 @@ int wxGenericListCtrl::OnGetItemImage(long WXUNUSED(item)) const
{
wxCHECK_MSG(!GetImageList(wxIMAGE_LIST_SMALL),
-1,
wxT("List control has an image list: OnGetItemImage should be overridden."));
wxT("List control has an image list, OnGetItemImage or OnGetItemColumnImage should be overridden."));
return -1;
}
int wxGenericListCtrl::OnGetItemColumnImage(long item, long column) const
{
if (!column)
return OnGetItemImage(item);
return -1;
wxListItemAttr *
wxGenericListCtrl::OnGetItemAttr(long WXUNUSED_UNLESS_DEBUG(item)) const
{