WbkRibbonView.getViewCategory

Syntax

getViewCategory ();

Description

The getViewCategory method returns the View tab of workbook tool ribbon.

Comments

This method returns an object of the WbkRibbon class.

Example

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 View tab on the workbook ribbon
var viewCategory = ribbonView.getViewCategory();
var viewCategoryButt = new PP.Ui.Button({
ParentNode: document.body, //DOM parent node
Content: "View", //Title      
Click: PP.Delegate(onClickViewCategory)     
}); 
var state = false;
function onClickViewCategory()
{
//Show/Hide the View tab on the workbook ribbon
state ?  viewCategory.hide() :  viewCategory.show();
state = !state;
}

After executing the example the View button is placed on the page. Clicking this button shows or hides the View ribbon tab.

See also:

WbkRibbonView