Show / Hide Table of Contents

Method toolbar.Add


Overload

Adds button. Same as toolbar.this[].

public TBItem Add(string text, Action<TBItem> click, MTImage image = default, int l_ = 0, string f_ = null)
Parameters
text  (string)

Text. Or "Text|Tooltip", or "|Tooltip", or "Text|". Separator can be "|" or "\0 " (then "|" isn't a separator). To always display text regardless of toolbar.DisplayText, append "\a", like "Text\a" or "Text\a|Tooltip".

click  (Action<TBItem>)

Action called when the button clicked.

image  (MTImage)

Image. Read here: MTBase.

l_  (int)

Caller info parameter

f_  (string)

Caller info parameter

Returns
TBItem

Remarks

More properties can be specified later (set properties of the returned TBItem or use toolbar.Items) or before (MTBase.ActionThread, MTBase.ActionException, MTBase.ExtractIconPathFromCode, MTBase.PathInTooltip).