SftTree/DLL 6.5

SelectionStyle

Softel vdm, Inc.

Defines the display style of selected items.

C

int WINAPI SftTree_GetSelectionStyle(HWND hwndCtl);
void WINAPI SftTree_SetSelectionStyle(HWND hwndCtl, int style);
int WINAPI SftTreeSplit_GetSelectionStyle(HWND hwndCtl);
void WINAPI SftTreeSplit_SetSelectionStyle(HWND hwndCtl, int style);

C++

int CSftTree::GetSelectionStyle() const;
void CSftTree::SetSelectionStyle(int style = SFTTREE_SELECTION_ALL);
int CSftTreeSplit::GetSelectionStyle() const;
void CSftTreeSplit::SetSelectionStyle(int style = SFTTREE_SELECTION_ALL);

Parameters

hwndCtl

The window handle of the tree control.

style

Defines the display style used for selected items. Style can be one of the following values:

SFTTREE_SELECTION_ALL

Highlights the entire item, including all cells, the label picture and item picture. When using the 3D display mode (enabled using SetShow3D), SFTTREE_SELECTION_ALL is equivalent to SFTTREE_SELECTION_CELLS.

SFTTREE_SELECTION_CELLS

Highlights cells only.

SFTTREE_SELECTION_CELL1

Highlights the text in the first cell only.

SFTTREE_SELECTION_CELLCURRENT

Highlights the entire current cell only. The current cell is always the cell in the first displayed column of the selected item(s).

SFTTREE_SELECTION_CELL1FULL

Highlights the text in the first cell only.  Identical to SFTTREE_SELECTION_CELL1, but the text background color of the selected item extends to the top and bottom of the cell.

The value of an entry in the above table can be combined with the following value and passed as style parameter:

SFTTREE_SELECTION_OUTLINE

The selected display style from the above table is rendered using a rounded outline rectangle with a gradient fill. The outline colors and gradient fill are defined using the members of the SFTTREE_COLORS structure. GDI+ support is required, otherwise SFTTREE_SELECTION_OUTLINE is ignored.
Information specific to SftTree/DLL Windows Mobile EditionWindows Mobile Edition:  SFTTREE_SELECTION_OUTLINE is not supported and has no effect.

Returns

GetSelectionStyle returns a value indicating the current display mode of selected items.

Comments

The GetSelectionStyle and SetSelectionStyle functions define the display style of selected items.

SelectionStyle affects the visual representation of the selected items only. SftTree/DLL supports item selection only. Cell selection as typically found in a grid control is not supported. It is possible to emulate cell selection using cell foreground and background colors (and using ShowFocus). 

See Also  C/C++ API  |  CategoriesNotifications

 


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