Table of Contents

Method AddStickyBtnCore

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

AddStickyBtnCore(string?, ImageSet?, ImageSet?, string?, EventHandler?)

Adds a sticky button to the user interface with the specified text, images, tooltip, and action.

public virtual SpeedButton AddStickyBtnCore(string? text, ImageSet? imageSet, ImageSet? imageSetDisabled, string? toolTip = null, EventHandler? action = null)

Parameters

text string

The text to display on the button. Can be null if no text is required.

imageSet ImageSet

The set of images to use for the button's normal state. Can be null if no image is required.

imageSetDisabled ImageSet

The set of images to use for the button's disabled state. Can be null if no image is required.

toolTip string

The tooltip text to display when the user hovers over the button. Can be null if no tooltip is required.

action EventHandler

The event handler to invoke when the button is clicked. Can be null if no action is required.

Returns

SpeedButton

A SpeedButton instance representing the sticky button. The button's margin is set to the default sticky button margin, and its click behavior adjusts the border widths based on the sticky state.

Remarks

A sticky button remains in a pressed state until explicitly toggled. The border widths of the button are adjusted dynamically based on its sticky state when clicked.