getExportButton ();
The getExportButton method returns the Export button.
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 Export tool ribbon tab in the view mode var exportButton = readonlyCat.getExportButton(); var state = True; var exportButtonButtonToggle = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Show/Hide button", //text Click: PP.Delegate(toggleExportButton) }); function toggleExportButton() { //Show or hide the Export button state ? exportButton.hide() : exportButton.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 Export button:
or:
See also: