getViewAsButton();
The getViewAsButton method returns the Show As button in the workbook ribbon.
This method returns value of the PP.Ui.RibbonButton.
To execute the example, the HTML page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component). Lock and refresh the Show As button in the workbook ribbon:
// Get tool ribbon var ribbon = workbookBox.getRibbonView(); // Get the Home tool ribbon category var mainCategory = ribbon.getMainCategory(); // Get the View As button var viewAsButton = mainCategory.getViewAsButton(); // Block this button viewAsButton.setEnabled(False); // Refresh the button mainCategory.updateViewAsMenu();
After executing the example the Show As button in the workbook ribbon is locked and refreshed:
See also: