addButton(value: JSON | PP.Ui.Button | PP.Ui.TabControl, position: PP.LTRB, _isItem: Boolean, fireEvent: Boolean);
value. Element to be added.
position. Panel position where an element 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 addButton method adds a button to the TabControl component.
Executing the example requires that the page contains the TabControl component named tabcontrol (see Example of Creating the TabControl Component). Add a button to the TabControl component:
tabcontrol1.AddButton.add(function (sender, args) { console.log("Addition of the button named " + args.Button.getContent()); }); tabcontrol1.addButton({Content: "Button"}, "Top", false, true);
After executing the example a button is added to the TabControl component, and the following message is displayed: Addition of the button named Button:
See also: