?? dialogtest.xml
字號:
<?xml version="1.0" encoding="UTF-8"?><!-- Very basic custom dialog. It shows how call backs for dialogs work using event listeners. This tests the dialog result and that dialogs are modal--><application> <window caption="Dialog Test" width="500" height="500"/> <resources> <script><![CDATA[function DialogTest() { var win = application.getWindow(); var btn = new BiButton("Show Dialog"); btn.setLocation(5, 5); win.add(btn); var btn2 = new BiButton("Hello World"); btn2.setLocation(btn.getLeft() + btn.getWidth() + 5 , 5); win.add(btn2); ///////////////////////////////////////////////////////////////// // dialog var dialog = new BiDialog(); var btn3 = new BiButton("Close"); dialog.getContentPane().add(btn3); //btn3.setSize(60, 24) btn3.setRight(5); btn3.setBottom(5); btn3.addEventListener("action", function () { dialog.setDialogResult("String result from dialog"); dialog.setVisible(false); }, this); // end dialog ///////////////////////////////////////////////////////////////// btn.addEventListener("action", function (e) { dialog.setVisible(true); }, this); btn2.addEventListener("action", function () { alert("Hello World"); }, this); dialog.addEventListener("dialogresult", function (e) { alert(e.getTarget().getDialogResult()); }, this);}DialogTest.main = function () { new DialogTest; }; ]]></script> </resources></application>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -