AceoffixCtrlAddCustomToolButton Method |
Namespace: Aceoffix
The index of button icon. Aceoffix predefines some button icons and you can use one of them. The default value is 0. Possible values as following:
The following code example shows how to use the AddCustomToolButton method.
AceoffixCtrl1.AddCustomToolButton("Save", "SaveDocument()", 1); AceoffixCtrl1.AddCustomToolButton("Print", "ShowPrintDlg()", 6); AceoffixCtrl1.AddCustomToolButton("-", "", 0); AceoffixCtrl1.AddCustomToolButton("Switch Full-screen", "SwitchFullScreen()", 4);
And then, you should define the JavaScript functions in the aspx file of current page.
<script language="javascript" type="text/javascript"> function SaveDocument() { document.getElementById("AceoffixCtrl1").SaveDocument(); } function ShowPrintDlg() { document.getElementById("AceoffixCtrl1").ShowDialog(4); //Print dialog box } function SwitchFullScreen() { document.getElementById("AceoffixCtrl1").FullScreen = !document.getElementById("AceoffixCtrl1").FullScreen; } </script>