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
A SftButton control is always in one of four rendering states. The state selects which set of per-state fields on SFTBUTTON_CONTROL the control draws from.
| State | When active | Fields used |
|---|---|---|
| Normal | The default state. The mouse is not over the button, the button is not being held down, and the button is enabled. | Picture1, Picture2, PictureBG, colorBg (or colorBgStart / colorBgEnd), colorFg |
| Hover | The mouse is over the button and hover detection fires (see Hover Detection). | Picture1Hover, Picture2Hover, PictureBGHover, colorBgHover (or colorBgHoverStart / colorBgHoverEnd) |
| Pressed | The user is holding the primary mouse button down over the button, or the button is in its toggle-pressed state (fToggle and fPressed both TRUE). | Picture1Pressed, Picture2Pressed, PictureBGPressed, colorBgPressed, colorFgPressed |
| Disabled | The button has been disabled through WS_DISABLED / EnableWindow. | Picture1Disabled, Picture2Disabled, PictureBGDisabled, colorFgGrayed |
If a per-state image is not set, the control falls back to the matching field from the normal state. That way you only need to populate Hover / Pressed / Disabled variants when you want them to differ from Normal. Text uses a single SFT_TEXT field that applies to every state - colorFg / colorFgPressed / colorFgGrayed provide the per-state text colors.
Focus is orthogonal to the four states above. A focused button uses the colorBgFocus (or colorBgFocusStart / colorBgFocusEnd) gradient when no other state overrides it. The focus rectangle is drawn on top regardless of state, unless fHideFocus is TRUE.
The four-state model is unchanged in dark mode and high contrast - the same per-state pictures are drawn. Caller-supplied colors are honored in dark mode and overridden by the system palette in high contrast. See Dark Mode and High Contrast.
