SftTree/DLL 6.5

ReorderColumns

Softel vdm, Inc.

Defines whether columns can be reordered using column drag & drop.

C

BOOL WINAPI SftTree_GetReorderColumns(HWND hwndCtl);
void WINAPI SftTree_SetReorderColumns(HWND hwndCtl, BOOL fSet);
BOOL WINAPI SftTreeSplit_GetReorderColumns(HWND hwndCtl);
void WINAPI SftTreeSplit_SetReorderColumns(HWND hwndCtl, BOOL fSet);

C++

BOOL CSftTree::GetReorderColumns() const;
void CSftTree::SetReorderColumns(BOOL fSet = TRUE);
BOOL CSftTreeSplit::GetReorderColumns() const;
void CSftTreeSplit::SetReorderColumns(BOOL fSet = TRUE);

Parameters

hwndCtl

The window handle of the tree control.

fSet

Set to TRUE to enable column reordering, otherwise set to FALSE.

Returns

GetReorderColumns returns TRUE if columns can be reordered by the user using the mouse, otherwise FALSE is returned.

Comments

The GetReorderColumns and SetReorderColumns functions define whether columns can be reordered using column drag & drop.

Individual columns can be locked in place even if column reordering is in effect, by adding the SFTTREE_COL_KEEPPOS value to the colFlag member of the SFTTREE_COLUMN_EX structure.  SFTTREE_COL_KEEPPOS causes the column to remain in the current display position.

If an application wants to retain the column order between sessions, the dispPos member of the SFTTREE_COLUMN_EX structure must be saved for each column.  When the application is restarted and the tree control is reinitialized, the values of the dispPos member can be restored for each column before calling SetColumns.  An INI file or the Windows Registry can be used to save these values.

In a split tree control columns can only be reordered within the left side or the right side.  It is not possible to drag columns from one pane to the other.

Also see the section "Column Drag & Drop" for additional information. 

See Also  C/C++ API  |  CategoriesNotifications

 


Feedback / comments / error reports for this topic
© 2009 - Softel vdm, Inc. - www.softelvdm.com