dialogtest.xml

来自「ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.」· XML 代码 · 共 65 行

XML
65
字号
<?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 + =
减小字号Ctrl + -
显示快捷键?