MainCatView.getInsertButton

Syntax

getInsertButton();

Description

The getInsertButton method returns the Add Series button.

Comments

The method returns an object of the PP.Ui.RibbonButton type.

Example

To execute the example, the HTML page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component). Rename all buttons in the Data Series panel of the Table tab:

// Get tool ribbon
var ribbon = workbookBox.getRibbonView();
// Get the Home tab
var mainCatView = ribbon.getMainCategory();
// Get the Add Series button
var insertButton = mainCatView.getInsertButton();
// Get the Group button
var groupSeriesButton = mainCatView.getGroupSeriesButton(); 
// Get the Ungroup button
var ungroupSeriesButton = mainCatView.getUngroupSeriesButton();
// Get the Remove button
var removeButton = mainCatView.getRemoveButton();
// Determine new names for all obtained buttons
insertButton.setContent("New Series");
groupSeriesButton.setContent("Group Series");
ungroupSeriesButton.setContent("Ungroup Series");
removeButton.setContent("Remove series");
// Determine key of new data source factor directory
var rubKey = 2032;
mainCatView.changeSource(rubKey, "Test", False);
// Refresh the Home tool ribbon tab
mainCatView.refreshAll();

After executing the example all buttons in the Data Series panel of the Table tab are renamed:

See also:

MainCatView