void wxDataViewColumn::SetReorderable( bool reorderable )
{
- // TODO
+ if (reorderable)
+ m_flags |= wxDATAVIEW_COL_REORDERABLE;
+ else
+ m_flags &= ~wxDATAVIEW_COL_REORDERABLE;
}
void wxDataViewColumn::SetSortOrder( bool ascending )
case HDN_BEGINDRAG:
// user has started to reorder a column
+ if (!GetColumn(nmHDR->iItem)->IsReorderable())
+ {
+ // veto it!
+ *result = TRUE;
+ }
break;
+ case HDN_ENDDRAG: // user has finished reordering a column
+ {
+ // TODO: How to query the new position here?
+ }
+ break;
+
case HDN_ITEMCHANGING:
if (nmHDR->pitem != NULL &&
(nmHDR->pitem->mask & HDI_WIDTH) != 0)
case HDN_ITEMCHANGED: // user is resizing a column
case HDN_ENDTRACK: // user has finished resizing a column
- case HDN_ENDDRAG: // user has finished reordering a column
// update the width of the modified column:
if (nmHDR->pitem != NULL &&