SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
SftButton supports solid and two-color gradient backgrounds for every rendering state. Colors are specified per state through the SFTBUTTON_CONTROL structure.
| State | Solid | Gradient (start, end) |
|---|---|---|
| Normal | colorBg | colorBgStart, colorBgEnd |
| Hover | colorBgHover | colorBgHoverStart, colorBgHoverEnd |
| Focus (button has keyboard focus) | colorBgFocus | colorBgFocusStart, colorBgFocusEnd |
| Pressed | colorBgPressed | - |
If both gradient endpoints (colorBgStart / colorBgEnd, etc.) are valid colors, the background is rendered as a gradient between them and the solid color is ignored. If either endpoint is SFTBUTTON_NOCOLOR, the solid color is used instead. nFillOrientation selects gradient direction: SFT_ORIENTATION_HORZ (left to right) or SFT_ORIENTATION_VERT (top to bottom, default).
Any color field can be set to SFTBUTTON_NOCOLOR to request "transparent" / "system default" behavior - the control uses the appropriate system or palette color.
colorFg is the text color for the normal and hover states. colorFgPressed replaces it when the button is pressed; colorFgGrayed replaces it when the button is disabled. colorFgDownArrow is the dropdown-arrow color (or SFTBUTTON_NOCOLOR for the system default). See Text and Fonts.
colorDarkEdge, colorLightEdge, colorShadowEdge and colorWhiteEdge control the four facets of the 3D edge that SFTBUTTON_BORDER_STANDARD draws. Each field can be SFTBUTTON_NOCOLOR to use the system default. See Borders.
colorBgOutside is the color of the area surrounding the button rectangle when the button is smaller than its window (or has been auto-sized). It is rarely set explicitly; the default of SFTBUTTON_NOCOLOR uses the parent's background.
When themes are active (nUseThemes is SFTBUTTON_THEME_YES), Windows paints the background and border; caller-supplied background colors are ignored. When dark mode is active, caller colors are honored - the application's chosen colors still win over the dark palette default. When Windows High Contrast is active, caller colors are ignored and the user's contrast theme wins (see High Contrast).
Accent colors that work in both light and dark modes use channels in the RGB 30-210 range; pure-channel values (0 or 255) often read poorly in one mode or the other.
