|
|
|
SFTTREE_CONTROL |
The SFTTREE_CONTROL structure is used with GetControlInfo and SetControlInfo to retrieve and set a tree control's color attributes.
typedef struct tagSftTreeControl { /* Modifiable fields */ int cbSize; // structure size BOOL fGridHorizontalFull; // full width horizontal lines (when grid lines enabled) BOOL fSelectEnabledItemsOnly; // only enabled items are selectable BOOL fRowColumnHeaderColorsOverrideTheme;// true if the row/column header's colors override windows theme colors int iMouseOverTransitionEffect; // enable expand/collapse button transition effect when the mouse enters/leaves the tree control int nCharSearchMaxInterval; // interval after which search starts over, if there are no characters typed int iFlybyStyle; // Flyby highlighting style #define SFTTREE_FLYBY_NONE 0 #define SFTTREE_FLYBY_COL1 1 #define SFTTREE_FLYBY_ALLCOLUMNS 2 SFT_PICTURE ButtonExpanded; // Expand/collapse button images SFT_PICTURE ButtonCollapsed; SFT_PICTURE ButtonExpandedDown; SFT_PICTURE ButtonCollapsedDown; SFT_PICTURE ButtonExpandedHot; SFT_PICTURE ButtonCollapsedHot; /* read/only fields */ int errorValue; // last GetControlInfo error value } SFTTREE_CONTROL, * LPSFTTREE_CONTROL; typedef const SFTTREE_CONTROL * LPCSFTTREE_CONTROL;
Members
This field must be set to the SFTTREE_CONTROL structure size before calling GetControlInfo and SetControlInfo otherwise the call will fail.
Defines whether horizontal grid lines extend into the empty area next to the last column. An empty area is only available if the last column is not an open-ended column. Set to TRUE so grid lines extend into the empty area next to the last column, otherwise FALSE. This value can be modified using SetControlInfo.
Defines whether transition effects for expand/collapse buttons and tree lines are used when the mouse enters/leaves the tree control. Expand/collapse buttons and tree lines must be suitably defined to be visible (using SetShowButtons, SetShowButton0 and SetTreeLineStyle), otherwise this setting has no effect. A gradual, visual transition is used to show/hide the expand/collapse buttons and tree lines. GDI+ support is required for transition effects, otherwise iMouseOverTransitionEffect is ignored.
One value of the following table can be assigned to the iMouseOverTransitionEffect member.
iMouseOverTransitionEffect |
Transition effect |
SFTTREE_TRANSITION_NONE |
No transition effects are used. |
SFTTREE_TRANSITION_THEMEDVISTAONLY_NOFOCUS |
Transition effects are used on Windows Vista (and up) only, when Windows themes are used. When the tree control does not have the input focus and the mouse cursor enters the tree control area, the expand/collapse buttons and tree lines become visible. When the mouse cursor leaves the tree control area, they are hidden. |
SFTTREE_TRANSITION_THEMEDVISTAONLY |
Transition effects are used on Windows Vista (and up) only, when Windows themes are used. When the mouse cursor enters the tree control area, the expand/collapse buttons and tree lines become visible. When the mouse cursor leaves the tree control area, they are hidden. |
SFTTREE_TRANSITION_ALWAYS_NOFOCUS |
Transition effects are on all operating systems. When the tree control does not have the input focus and the mouse cursor enters the tree control area, the expand/collapse buttons and tree lines become visible. When the mouse cursor leaves the tree control area, they are hidden. |
SFTTREE_TRANSITION_ALWAYS |
Transition effects are on all operating systems. When the mouse cursor enters the tree control area, the expand/collapse buttons and tree lines become visible. When the mouse cursor leaves the tree control area, they are hidden. |
Windows
Mobile Edition: iMouseOverTransitionEffect is not supported.
This value can be modified using SetControlInfo.
Defines the interval in milliseconds, after which a search starts again if there is no character input. The default is 1000 (1 second). The exact search method is defined using CharSearchMode. This value can be modified using SetControlInfo.
Defines the image used as the expand/collapse button for all expanded parent items. User-defined expand/collapse button images are only used if the SetButtons(SFTTREE_BUTTON_USERDEF) is in effect and at least ButtonExpanded and ButtonCollapsed define valid images. Use Sft_ClearPicture to omit the user-defined button image. This value can be modified using SetControlInfo.
Defines the image used as the expand/collapse button for all collapsed parent items. User-defined expand/collapse button images are only used if the SetButtons(SFTTREE_BUTTON_USERDEF) is in effect and at least ButtonExpanded and ButtonCollapsed define valid images. Use Sft_ClearPicture to omit the user-defined button image. This value can be modified using SetControlInfo.
Defines the image used as the expand/collapse button for expanded parent items, when the button is pressed. User-defined expand/collapse button images are only used if the SetButtons(SFTTREE_BUTTON_USERDEF) is in effect. If ButtonExpandedDown doesn't define an image, ButtonExpanded is used instead. Use Sft_ClearPicture to omit the user-defined button image. This value can be modified using SetControlInfo.
Defines the image used as the expand/collapse button for collapsed parent items, when the button is pressed. User-defined expand/collapse button images are only used if the SetButtons(SFTTREE_BUTTON_USERDEF) is in effect. If ButtonCollapsedDown doesn't define an image, ButtonCollapsed is used instead. Use Sft_ClearPicture to omit the user-defined button image. This value can be modified using SetControlInfo.
Defines the image used as the expand/collapse button for expanded parent items, when the mouse cursor is on the button. User-defined expand/collapse button images are only used if the SetButtons(SFTTREE_BUTTON_USERDEF) is in effect. If ButtonExpandedHot doesn't define an image, ButtonExpanded is used instead. Use Sft_ClearPicture to omit the user-defined button image. This value can be modified using SetControlInfo.
Defines the image used as the expand/collapse button for collapsed parent items, when the mouse cursor is on the button. User-defined expand/collapse button images are only used if the SetButtons(SFTTREE_BUTTON_USERDEF) is in effect. If ButtonCollapsedHot doesn't define an image, ButtonCollapsed is used instead. Use Sft_ClearPicture to omit the user-defined button image. This value can be modified using SetControlInfo.
Read/only. If the SetControlInfo function fails, the errorValue member contains an error code, indicating which structure member has caused the failure:
errorValue |
Invalid SFTTREE_CONTROL structure member |
SFTTREE_ERR_iMouseOverTransitionEffect |
iMouseOverTransitionEffect |
SFTTREE_ERR_nCharSearchMaxInterval |
nCharSearchMaxInterval |
SFTTREE_ERR_iFlybyStyle |
iFlybyStyle |
Defines whether only enabled items (see ItemStatus) can be selected by the end-user. Set to TRUE so only enabled items can be selected by the end-user, otherwise FALSE. This value can be modified using SetControlInfo. An application can always select items , regardless of the settings of fSelectEnabledItemsOnly.
fRowColumnHeaderColorsOverrideTheme
Defines whether an application can override Windows themes and the row/column header colors are used to render the row/column header. Set to TRUE to use the defined colors (SFTTREE_COLORS, colorRowColHdrBg, colorRowColHdrDarkEdge, colorRowColHdrLightEdge) instead of Windows themes, otherwise set to FALSE. If all colors are set to their default value (SFTTREE_NOCOLOR), Windows themes are used.
Defines how items are highlighted by flyby highlighting. If a selection style is used that uses a rounded outline rectangle with a gradient fill, the cell text is not underlined. Instead, a rounded outline rectangle with a gradient fill is used to highlight the item, based on the current selection style (see GetSelectionStyle).
One value of the following table can be assigned to iFlybyStyle.
iFlybyStyle |
Effect |
SFTTREE_FLYBY_NONE |
|
SFTTREE_FLYBY_COL1 |
Cell text in the first displayed column is underlined. If a selection style is used that uses a rounded outline rectangle with a gradient fill, the cell text is not underlined. Instead, a rounded outline rectangle with a gradient fill is used to highlight the item, based on the current selection style (see GetSelectionStyle). |
SFTTREE_FLYBY_ALLCOLUMNS |
Cell text in all columns is underlined. If a selection style is used that uses a rounded outline rectangle with a gradient fill, the cell text is not underlined. Instead, a rounded outline rectangle with a gradient fill is used to highlight the item, based on the current selection style (see GetSelectionStyle). |
This value can be modified using SetControlInfo.
Comments
The SFTTREE_CONTROL structure is used with GetControlInfo and SetControlInfo to retrieve and set tree control attributes.
See Also C/C++ API | Categories | Notifications