//简单向导窗口

import win.ui;
/*DSG{{*/
var winform = win.form(parent=...; text="AAuto Form";right=599;bottom=399 )
winform.add(  )
/*}}*/

import win.wizard; 
wiz = win.wizard( text = "向导窗口标题" )

wiz.onFinish = function () {
	..io.open()
	io.print(  wiz.items[1].checkbox.checked );
	io.print(  wiz.items[2].button.text ); 
}
 
wiz.add("标题").loader = function (hwnd) {
	var form = win.form( hwnd = hwnd; );
	form.add( 
		button={ bottom=85;text="按钮";left=27;top=1;z=1;right=243;cls="button" }
		checkbox={ bottom=155;right=195;left=58;top=130;z=2;text="允许下一步";cls="checkbox" }
	)  
	form.onNext = function(){
		if(!form.checkbox.checked){
			form.msgboxErr("请选中上面的复选框","向导窗口")
			return false;
		} 
	} 
	return form;
} 
 
wiz.add("标题2").loader = function (hwnd) {
	var form = win.form( hwnd = hwnd; );
	form.add( 
		button={ bottom=85;text="按钮2";left=27;top=1;z=1;right=243;cls="button" } 
	)   
	return form;
} 

wiz.doModal(winform)  
win.loopMessage();
