HeaderPane
Main
Hide

SftButton/DLL 3.0 - Button Control

Share Link
Print

Press Animation

The "bounce" animation is a short visual offset applied when the user presses the button - the button content shifts a few pixels down and to the right, giving a tactile feedback cue. The effect is purely visual; no additional click notifications are generated.

Per-control override

iBounce on SFTBUTTON_CONTROL controls the animation per button:

ValueBehavior
SFTBUTTON_BOUNCE_DEFAULT (0)Follow the application default (which is currently on). Use this value when you don't need to override.
SFTBUTTON_BOUNCE_YES (1)Always animate on press, regardless of the application default.
SFTBUTTON_BOUNCE_NO (2)Never animate, regardless of the application default. Useful for rapid-fire buttons (tool palette items, step buttons) where the animation would feel sluggish.

Interaction with theme

When themes are active (nUseThemes is SFTBUTTON_THEME_YES), Windows draws the pressed-state visual and the bounce animation is suppressed - the theme's own press animation is used instead.

DPI

The pixel offset of the bounce animation is scaled automatically by monitor DPI. No caller action is needed. See Per-Monitor DPI and Scaling.


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