getFormulasCategory ();
The getFormulasCategory method returns the Calculations tab in workbook ribbon.
This method returns an object of the WbkRibbon class.
To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), and also add the following code in the handler, that processes document opening event:
//Get the Ribbon component var ribbonView = workbookBox.getRibbonView(); //Get the Calculations workbook tool ribbon tab var formulasCategory = ribbonView.getFormulasCategory(); var formulasCategoryButt = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Calculations", //Text Click: PP.Delegate(onClickFormulasCategory) }); var state = False; function onClickFormulasCategory() { //Shoe or hide the Calculations workbook tool ribbon tab state ? formulasCategory.hide() : formulasCategory.show(); state = !state; }
After executing the example the Calculations button is added to the page. Clicking this button hides or shows the Calculations tab in workbook ribbon.
See also: