📄 checkboxtest.xml
字号:
<?xml version="1.0"?><!-- Another very basic test. This one tests the icon position of the check box--><Application> <Window caption="Check Box Test" width="225" height="113" centered="true" resizable="true" fullScreen="false"> </Window> <Resources> <Script><![CDATA[function CheckBoxTest() { var win = application.getWindow(); var btn = new BiCheckBox("Hello World"); btn.setName("Check Box 1"); btn.setLocation(10, 10); win.add(btn); var btn2 = new BiCheckBox("Hello World"); btn2.setName("Check Box 2"); btn2.setIconPosition("top"); btn2.setEnabled(false); btn2.setLocation(btn.getLeft() + btn.getWidth() + 5 , 10); win.add(btn2); btn.addEventListener("change", this.onButtonClick, this); btn2.addEventListener("change", this.onButtonClick, this); win.addEventListener("contextmenu", function () { //btn2.setChecked(!btn2.getChecked()) btn2.setEnabled( !btn2.getEnabled() ) }); //btn.pack() //btn2.pack()}CheckBoxTest.prototype.onButtonClick = function (e) { var win = application.getWindow(); win.setCaption(e.getTarget().getName() + " changed to " + e.getTarget().getChecked());};CheckBoxTest.main = function () { new CheckBoxTest;}; ]]></Script> </Resources></Application>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -