]> git.saurik.com Git - wxWidgets.git/commitdiff
Remove the ability to sort by column in virtual wxListCtrl, and remove movable column...
authorKevin Ollivier <kevino@theolliviers.com>
Mon, 2 Oct 2006 22:48:14 +0000 (22:48 +0000)
committerKevin Ollivier <kevino@theolliviers.com>
Mon, 2 Oct 2006 22:48:14 +0000 (22:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/listctrl_mac.cpp
src/mac/carbon/utils.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;
index d2a07749ca4661e6b62e9c946129b39df5023deb..33f2e098ce5aa51f4c9a48646bd15d32a94f81fd 100644 (file)
@@ -1900,7 +1900,7 @@ void wxMacDataItemBrowserControl::InsertColumn(int colId, DataBrowserPropertyTyp
 
     columnDesc.propertyDesc.propertyID = (kMinColumnId + colId);
     columnDesc.propertyDesc.propertyType = colType;
-    columnDesc.propertyDesc.propertyFlags = kDataBrowserListViewDefaultColumnFlags | kDataBrowserListViewTypeSelectColumn; 
+    columnDesc.propertyDesc.propertyFlags = kDataBrowserListViewSortableColumn | kDataBrowserListViewTypeSelectColumn; 
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
     columnDesc.propertyDesc.propertyFlags |= kDataBrowserListViewNoGapForIconInHeaderButton;
 #endif