]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/listctrl_mac.cpp
Bakefile changes for building the graphics context modules, and
[wxWidgets.git] / src / mac / carbon / listctrl_mac.cpp
index 31c3638d6b23103d2e0cc71a7d855c9a14934199..f41b579bc867d0663b5463a8d951599e2f79450b 100644 (file)
@@ -1217,15 +1217,18 @@ long wxListCtrl::InsertColumn(long col, wxListItem& item)
         }
         m_dbImpl->InsertColumn(col, type, item.GetText(), just, item.GetWidth());
 
+        // set/remove options based on the wxListCtrl type.
+        DataBrowserTableViewColumnID id;
+        m_dbImpl->GetColumnIDFromIndex(col, &id);
+        DataBrowserPropertyFlags flags;
+        verify_noerr(m_dbImpl->GetPropertyFlags(id, &flags));
         if (GetWindowStyleFlag() & wxLC_EDIT_LABELS)
-        {
-            DataBrowserTableViewColumnID id;
-            m_dbImpl->GetColumnIDFromIndex(col, &id);
-            DataBrowserPropertyFlags flags;
-            verify_noerr(m_dbImpl->GetPropertyFlags(id, &flags));
             flags |= kDataBrowserPropertyIsEditable;
-            verify_noerr(m_dbImpl->SetPropertyFlags(id, flags));
+                
+        if (GetWindowStyleFlag() & wxLC_VIRTUAL){
+            flags &= ~kDataBrowserListViewSortableColumn;
         }
+        verify_noerr(m_dbImpl->SetPropertyFlags(id, flags));
     }
 
     return col;