ReadonlyCatView.getDiscussButton

Syntax

getDiscussButton ();

Description

The getDiscussButton method returns the Share button.

Example

To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component). Open the express report source for view by means of the openDocument method, and add the following code in the document open event handler:

	//Return the Home tool ribbon tab in the view mode
	var readonlyCat = workbookBox.getRibbonView().getReadonlyCategory();
					
	//Return the Share button
	var discussButton = readonlyCat.getDiscussButton();
	var state = True;
	var discussButtonToggle = new PP.Ui.Button({
		ParentNode: document.getElementById("params")
		Content: "Show/Hide button", //text      
		Click: PP.Delegate(toggleDiscussButton)     
	}); 
					
	function toggleDiscussButton()
	{
		//Show or hide the Share button
		state ? discussButton.hide() : discussButton.show();
		state = !state;
	}

After executing the example the WorkbookBox component and a button named Show/Hide Button are placed in the HTML page. Clicking this button shows or hides the Share button:

or:

See also:

ReadonlyCatView