WbkRibbonView.getReadonlyCategory

Syntax

getReadonlyCategory ();

Description

The getReadonlyCategory method returns the Home ribbon tab in view mode.

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), open the document by means of the openDocument, function, also add the following code to the document open event handler:

//Return the Home ribbon tab in the view mode
var readonlyCat = workbookBox.getRibbonView().getReadonlyCategory();
//Return the Discuss in SharePoint button
var sharePointButton = readonlyCat.getSharePointButton();
var state = True;
//Show the Discuss in SharePoint button
sharePointButton.show();
//Get the Ribbon component
var ribbonView = workbookBox.getRibbonView();
//Subscribe to the event of click the Discuss in SharePoint tool ribbon button
ribbonView.Discuss.add(function()
{
	alert('The Discuss in SharePoint button is pressed');
});

After executing the example the Discuss in SharePoint button is added in the Home ribbon tab. On clicking this button an appropriate message appears:

See also:

WbkRibbonView