?? tooltiptest2.xml
字號:
<?xml version="1.0"?><!-- This tests changing the tooltip text while the tooltip is shown--><application> <window caption="Tool Tip Test" width="300" height="200"/> <resources> <script><![CDATA[function ToolTipTest2() { var win = application.getWindow(); var tt = new BiToolTip("Tool Tip"); tt.setHideInterval(10000); this._toolTip = tt; this.makeLabels(["Label 1", "Label Two", "Another Label", "Label 4"]); tt.addEventListener("beforeshow", function (e) { tt.setText(tt.getComponent().getText()); }); win.addEventListener("mousemove", function (e) { if (tt.getIsVisible()) { tt.setText(tt.getComponent().getText() + "\n(" + e.getClientX() + ", " + e.getClientY() + ")" ); tt.pack(); tt.layoutComponent(); } });}ToolTipTest2.prototype.makeLabels = function (aTexts) { var l = aTexts.length this._labels = new Array(l); var tmp; var top = 5; var b = new BiBorder(1, "solid", "ThreeDDarkShadow"); var win = application.getWindow(); for (var i = 0; i < l; i++ ) { tmp = new BiLabel(aTexts[i]); tmp.setBorder(b); tmp.setBackColor("Window"); tmp.setPadding(2); tmp.setLocation(5, top); tmp.setRight(5); tmp.setToolTip(this._toolTip); win.add(tmp); top += tmp.getHeight() + 5; }}ToolTipTest2.main = function () { new ToolTipTest2(); }; ]]></script> </resources></application>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -