Table of Contents

Method AddTool

Namespace
Alternet.UI
Assembly
Alternet.UI.dll

AddTool(string?, ImageSet?, string?, AuiToolbarItemKind?, ImageSet?, string?)

Adds a tool to the toolbar.

public int AddTool(string? label, ImageSet? bitmap = null, string? shortHelpString = null, AuiToolbarItemKind? itemKind = AuiToolbarItemKind.Normal, ImageSet? disabledBitmap = null, string? longHelpString = null)

Parameters

label string

The string to be displayed with the tool.

bitmap ImageSet

The primary tool bitmap.

shortHelpString string

This string is used for the tools tooltip.

itemKind AuiToolbarItemKind?

May be Normal for a normal button (default), Check for a checkable tool (such tool stays pressed after it had been toggled) or Radio for a checkable tool which makes part of a radio group of tools each of which is automatically unchecked whenever another button in the group is checked. Dropdown specifies that a drop-down menu button will appear next to the tool button.

disabledBitmap ImageSet

The bitmap used when the tool is disabled. If it is not specified (default), the disabled bitmap is automatically generated by greying the normal one.

longHelpString string

This string is shown in the statusbar (if any) of the parent frame when the mouse pointer is inside the tool.

Returns

int

An int by which the tool may be identified in subsequent operations.

Remarks

After you have added tools to a toolbar, you must call Realize() in order to have the tools appear.