I know how to hide them in the options object, but can i hide these buttons after the viewer is loaded?
thanks
JB
Hide save and print button
Re: Hide save and print button
Hi JB,
Yes, that is possible as well. Please check out the following approach of adding a new button:
And you could hide a button in a similar fashion as well.
Thank you,
Edward
Yes, that is possible as well. Please check out the following approach of adding a new button:
And you could hide a button in a similar fashion as well.
Code: Select all
<head>
<script>
var options = new Stimulsoft.Viewer.StiViewerOptions();
var viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);
var report = new Stimulsoft.Report.StiReport();
report.loadFile("Reports/SampleReportWithEditableText.mrt");
viewer.renderHtml("viewerCont");
viewer.report = report;
var toolbarTable = viewer.jsObject.controls.toolbar.firstChild;
viewer.jsObject.controls.toolbar.removeChild(toolbarTable);
var userToolbar = document.createElement("div");
viewer.jsObject.controls.toolbar.appendChild(userToolbar);
var userToolButton = document.createElement("div");
userToolButton.style.background = "red";
userToolButton.style.width = userToolButton.style.height = "25px";
userToolbar.appendChild(userToolButton);
userToolButton.onclick = function () {
viewer.jsObject.postExport(exportType, viewer.jsObject.getDefaultExportSettings(exportType));
}
</script>
</head>
<body>
<div id="viewerCont"></div>
</body>
Edward
Re: Hide save and print button
Thanks!
JB
JB
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Hide save and print button
Hello
We are always glad to help you!
Please let us know if you need any additional help.
Thank you.
We are always glad to help you!
Please let us know if you need any additional help.
Thank you.