Method InsertSpeedBtnCore
InsertSpeedBtnCore(int, ItemKind, string?, ImageSet?, ImageSet?, string?, EventHandler?)
Inserts a new SpeedButton into the collection at the specified index.
public virtual SpeedButton InsertSpeedBtnCore(int index, ToolBar.ItemKind itemKind, string? text, ImageSet? imageSet, ImageSet? imageSetDisabled, string? toolTip = null, EventHandler? action = null)
Parameters
indexintThe zero-based index at which the SpeedButton should be inserted.
itemKindToolBar.ItemKindThe kind of item represented by the SpeedButton. This determines its behavior and appearance.
textstringThe text to display on the SpeedButton. If null, an empty string is used.
imageSetImageSetThe image set to display on the SpeedButton. Can be null if no image is required.
imageSetDisabledImageSetThe image set to display when the SpeedButton is disabled. Can be null.
toolTipstringThe tooltip text to display when the user hovers over the SpeedButton. If null, the value of
textis used.actionEventHandlerAn optional event handler to invoke when the SpeedButton is clicked or double-clicked. Can be null.
Returns
- SpeedButton
The newly created SpeedButton instance that was inserted into the collection.
Remarks
The SpeedButton is configured with default padding,
alignment, and margins. If imageSetDisabled is provided,
it is used as the image set for the disabled state.
If action is provided, it is attached to both the click
and double-click events of the SpeedButton.