Property toolbar.this
Overload
Adds button. Same as toolbar.Add.
public Action<TBItem> this[string text, MTImage image = default, int l_ = 0, string f_ = null] { set; }
Parameters
|
text (string)
Text. Or |
|
image (MTImage)
Image. Read here: MTBase. |
| l_ (int) |
| f_ (string) |
Property Value
Remarks
More properties can be specified later (set properties of toolbar.Last TBItem or use toolbar.Items) or before (MTBase.ActionThread, MTBase.ActionException, MTBase.ExtractIconPathFromCode, MTBase.PathInTooltip).
Examples
These two are the same.
tb.Add("Example", o => print.it(o));
tb["Example"] = o => print.it(o);
These four are the same.
var b = tb.Add("Example", o => print.it(o)); b.Tooltip="tt";
tb.Add("Example", o => print.it(o)).Tooltip="tt";
tb["Example"] = o => print.it(o); var b=tb.Last; b.Tooltip="tt";
tb["Example"] = o => print.it(o); tb.Last.Tooltip="tt";