HeaderPane
Main
Hide

SftButton/DLL 3.0 - Button Control

Share Link
Print

SFTBUTTON_AUTOSIZE Constants

Values for the iAutoSize field on SFTBUTTON_CONTROL. Each value names the anchor point on the original button rectangle that stays fixed as the button auto-sizes to its content.

SFTBUTTON_AUTOSIZE_NONE (0)Auto-sizing is disabled. The button stays at its current rectangle regardless of content changes. Default.
SFTBUTTON_AUTOSIZE_TOPLEFTAnchor top-left. Button grows right and down.
SFTBUTTON_AUTOSIZE_TOPRIGHTAnchor top-right. Button grows left and down.
SFTBUTTON_AUTOSIZE_BOTTOMLEFTAnchor bottom-left. Button grows right and up.
SFTBUTTON_AUTOSIZE_BOTTOMRIGHTAnchor bottom-right. Button grows left and up.
SFTBUTTON_AUTOSIZE_TOPCENTERAnchor top-center. Button grows down and horizontally symmetric.
SFTBUTTON_AUTOSIZE_BOTTOMCENTERAnchor bottom-center. Button grows up and horizontally symmetric.
SFTBUTTON_AUTOSIZE_LEFTCENTERAnchor left-center. Button grows right and vertically symmetric.
SFTBUTTON_AUTOSIZE_RIGHTCENTERAnchor right-center. Button grows left and vertically symmetric.
SFTBUTTON_AUTOSIZE_CENTERAnchor center. Button grows symmetrically in all directions.

Auto-sizing uses CalcOptimalSize internally, so any change that affects the optimal size (text, font, images, border style, theme) triggers an immediate resize when iAutoSize is not SFTBUTTON_AUTOSIZE_NONE.

See Also Auto-Sizing | CalcOptimalSize | SFTBUTTON_CONTROL


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