HeaderPane
Main
Hide

SftButton/DLL 3.0 - Button Control

Share Link
Print

Dropdown Button

A SftButton can display an attached dropdown arrow on its right edge. Set fShowDropDown to TRUE on the SFTBUTTON_CONTROL structure to show the arrow. The arrow is drawn on top of the background, in a sidebar separated from the main button area.

Styles

The arrow shape and the sidebar width are controlled by nDropDownStyle:

StyleDescription
SFTBUTTON_DROPDOWNSTYLE_STANDARD (0)A standard width sidebar and arrow glyph. This is the default.
SFTBUTTON_DROPDOWNSTYLE_NARROW1 / _NARROW2 / _NARROW3Progressively narrower sidebars. Useful for tool buttons where horizontal space is tight.
SFTBUTTON_DROPDOWNSTYLE_WIDE1A wider sidebar. Useful for prominent dropdown affordances.

Notifications

Clicks on the dropdown arrow generate separate notifications so the application can distinguish between "invoke the primary button action" and "open the dropdown menu":

BN_CLICKED (SFTBUTTONN_CLICK)The user clicked on the main button area.
SFTBUTTONN_DROPDOWNCLICKThe user clicked on the dropdown arrow.
SFTBUTTONN_DBLCLICKThe user double-clicked on the main button area.
SFTBUTTONN_DROPDOWNDBLCLICKThe user double-clicked on the dropdown arrow.

A typical WM_COMMAND handler dispatches the dropdown notification by showing a popup menu; the primary BN_CLICKED handler invokes the button's default action. The application can also simulate a dropdown click programmatically with SftButton_DoClickDropDown.

Accessibility

When fShowDropDown is TRUE, the UIA control type exposed to screen readers becomes SplitButton (rather than plain Button). Narrator / NVDA / JAWS users can then invoke the primary action and the dropdown arrow as separate targets. See Accessibility (Screen Readers).


Last Updated 04/23/2026 - (email)
© 2026 Softel vdm, Inc.