]> git.saurik.com Git - wxWidgets.git/commitdiff
Adding virtual wxListCtrl impl of GetItem.
authorKevin Ollivier <kevino@theolliviers.com>
Thu, 26 Oct 2006 03:01:38 +0000 (03:01 +0000)
committerKevin Ollivier <kevino@theolliviers.com>
Thu, 26 Oct 2006 03:01:38 +0000 (03:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/listctrl_mac.cpp

index 1c2878f868bd120a1508cc08489814dcd27b21c6..9eab50bd693378ca7cbe3fe5788953db1e2181aa 100644 (file)
@@ -718,7 +718,22 @@ bool wxListCtrl::GetItem(wxListItem& info) const
         return m_genericImpl->GetItem(info);
 
     if (m_dbImpl)
-        m_dbImpl->MacGetColumnInfo(info.m_itemId, info.m_col, info);
+    {
+        if (!IsVirtual())
+            m_dbImpl->MacGetColumnInfo(info.m_itemId, info.m_col, info);
+        else
+        {
+            info.SetText( OnGetItemText(info.m_itemId, info.m_col) );
+            info.SetImage( OnGetItemColumnImage(info.m_itemId, info.m_col) );
+            wxListItemAttr* attrs = OnGetItemAttr( info.m_itemId );
+            if (attrs)
+            {
+                info.SetFont( attrs->GetFont() );
+                info.SetBackgroundColour( attrs->GetBackgroundColour() );
+                info.SetTextColour( attrs->GetTextColour() );
+            }
+        }
+    }
     bool success = true;
     return success;
 }