📄 splitpanetest.xml
字号:
<?xml version="1.0"?><!-- Test case for the split pane--><Application> <Window caption="SplitPaneTest" width="600" height="600" centered="true"/> <Resources> <Script><![CDATA[function SplitPaneTest() { var appWin = application.getWindow(); //appWin.setRightToLeft( true ); var l1 = new BiLabel("Left Label. Min Height = 100\nRight click to change" + " orientation\nUse UP and DOWN keys to change divider size\nUse" + " '1' / '2' to toggle the visibility of the left / right components."); var l2 = new BiLabel("Right Label. Min width = 100\nDouble click to change" + " continuousLayout"); var b = new BiBorder(1, "solid", "ThreeDShadow"); l1.setBorder(b); l2.setBorder(b); l1.setPadding(4); l2.setPadding(4); l1.setBackColor("window"); l2.setBackColor("window"); l1.setMinimumHeight(100); l2.setMinimumWidth(100); l1.setWrap(true); l2.setWrap(true); l1.setOverflow("auto"); l2.setOverflow("auto"); var sp = new BiSplitPane("horizontal", l1, l2); appWin.add(sp); sp.setLocation(5,5); sp.setRight(5); sp.setBottom(5); //sp.setContinuousLayout(false); sp.setOrientation("horizontal"); appWin.addEventListener("contextmenu", function (e) { sp.setOrientation( sp.getOrientation() == "horizontal" ? "vertical" : "horizontal"); }); appWin.addEventListener("dblclick", function (e) { sp.setContinuousLayout( !sp.getContinuousLayout() ); }); appWin.addEventListener("keydown", function (e) { var kc = e.getKeyCode(); switch (kc) { case BiKeyboardEvent.DOWN: var s = sp.getDividerSize(); s = Math.max(2, s - 2); sp.setDividerSize(s); break; case BiKeyboardEvent.UP: var s = sp.getDividerSize(); s = Math.max(2, s + 2); sp.setDividerSize(s); break; case "1".charCodeAt(0): sp.setLeftVisible( !sp.getLeftVisible() ); //alert("leftVisible: " + sp.getLeftVisible() + "\n" + // "rightVisible: " + sp.getRightVisible()) break; case "2".charCodeAt(0): sp.setRightVisible( !sp.getRightVisible() ); //alert("leftVisible: " + sp.getLeftVisible() + "\n" + // "rightVisible: " + sp.getRightVisible()) break; } });}SplitPaneTest.main = function () { new SplitPaneTest; }; ]]></Script> </Resources></Application>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -