+void wxDataViewColumn::SetReorderable(bool reorderable)
+{
+ // first set the internal flag of the column:
+ if (reorderable)
+ this->m_flags |= wxDATAVIEW_COL_REORDERABLE;
+ else
+ this->m_flags &= ~wxDATAVIEW_COL_REORDERABLE;
+ // if the column is associated with a control change also immediately the flags of the control:
+ wxDataViewCtrl* dataViewCtrlPtr(this->GetOwner()); // variable definition and initialization
+
+ if (dataViewCtrlPtr != NULL)
+ {
+ // variable definition and initialization:
+ DataBrowserPropertyFlags flags;
+ wxMacDataViewDataBrowserListViewControlPointer macDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(dataViewCtrlPtr->GetPeer()));
+
+ wxCHECK_RET(macDataViewListCtrlPtr != NULL, _("Valid pointer to native data view control does not exist"));
+ wxCHECK_RET(macDataViewListCtrlPtr->GetPropertyFlags(this->GetPropertyID(),&flags) == noErr,_("Could not get property flags."));
+ if (reorderable)
+ flags |= kDataBrowserListViewMovableColumn;
+ else
+ flags &= ~kDataBrowserListViewMovableColumn;
+ wxCHECK_RET(macDataViewListCtrlPtr->SetPropertyFlags(this->GetPropertyID(),flags) == noErr,_("Could not set property flags."));
+ } /* if */
+} /* wxDataViewColumn::SetReorderable(bool) */
+