insertButton(value: JSON | PP.Ui.Button | PP.Ui.TabControl, position: PP.LTRB, _isItem: Boolean, fireEvent: Boolean);
value. Element to be added.
position. Position of the panel where item will be added.
_isItem. Indicates whether an element is added as a tab.
fireEvent. Indicates whether the TabControl.AddButton event is called on method execution.
The insertButton method adds a button to the TabControl component.
Available values of the _isItem parameter:
true. The element is added as a tab.
false. Default value. The element is added as a button.
Available values of the fireEvent parameter:
true. Default value. The TabControl.AddButton event is generated on method execution.
false. The TabControl.AddButton event is not generated on method execution.
The method completely repeats actions of the TabControl.addButton method.
The example of method use is given in description of the TabControl.removeItemByIndex method.
See also: