SftTree/DLL 6.5

SelectionArea

Softel vdm, Inc.

Defines the area where selection changes occur.

C

int WINAPI SftTree_GetSelectionArea(HWND hwndCtl);
void WINAPI SftTree_SetSelectionArea(HWND hwndCtl, int area);
int WINAPI SftTreeSplit_GetSelectionArea(HWND hwndCtl);
void WINAPI SftTreeSplit_SetSelectionArea(HWND hwndCtl, int area);

C++

int CSftTree::GetSelectionArea() const;
void CSftTree::SetSelectionArea(int area = SFTTREE_SELECTIONAREA_ALL);
int CSftTreeSplit::GetSelectionArea() const;
void CSftTreeSplit::SetSelectionArea(int area = SFTTREE_SELECTIONAREA_ALL);

Parameters

hwndCtl

The window handle of the tree control.

area

Defines the area where selection changes occur, when the user clicks the mouse button:

SFTTREE_SELECTIONAREA_ALL

Clicking anywhere on an item (all cells, tree lines, row header, etc.) will change the selection.

SFTTREE_SELECTIONAREA_ALLCELLS

Clicking on any cell of an item will change the selection.

SFTTREE_SELECTIONAREA_CELL

Clicking on the cell in the first column will change the selection.

SFTTREE_SELECTIONAREA_CELLTEXT

Clicking on the cell text in the first column will change the selection.

SFTTREE_SELECTIONAREA_ALLCELLS_ROWHDR

Clicking on the row header or any cell of an item will change the selection.

SFTTREE_SELECTIONAREA_CELL_ROWHDR

Clicking on the row header or the cell in the first column will change the selection.

SFTTREE_SELECTIONAREA_CELLTEXT_ROWHDR

Clicking on the row header or the cell text in the first column will change the selection.

Returns

GetSelectionArea returns a value defining the area where selection changes occur, when the user clicks the mouse button.

Comments

The GetSelectionArea and SetSelectionArea functions define the area where selection changes occur.

By using the SelectionArea function, the application can specify which areas of an item can cause a selection change when clicked.  If the defined area is clicked, the selection changes.  If an area of the item outside the defined area is clicked, only the current item (GetCaretIndex) is changed.

When using a limited area, such as SFTTREE_SELECTIONAREA_CELLTEXT, which only changes selections when the cell text is clicked, it is preferable to visually indicate this using the selection style SFTTREE_SELECTION_CELL1 (see SetSelectionStyle).

In a multiple selection tree control, the Control key (in combination with directional keys) can be used to move the caret location without moving the current selection, unless the style SFTTREE_SELECTIONAREA_ALL is used, in which case the Control key is ignored. 

See Also  C/C++ API  |  CategoriesNotifications

 


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