import win;
import win.ui;
import win.ui.menu
import win.ole
/*DSG{{*/
var winform = win.form(parent=...; min=1;bottom=135;max=1;text="AAuto Form";right=287 )
winform.add( 
button={ bottom=40;text="设置状态栏文本（无分块）";left=24;top=16;font=LOGFONT( name="宋体";h=-12 );z=0;right=264;cls="button" };
button2={ bottom=72;text="添加分块";left=24;top=48;font=LOGFONT( name="宋体";h=-12 );z=1;right=128;cls="button" };
button4={ bottom=104;right=264;left=24;top=80;font=LOGFONT( name="宋体";h=-12 );z=3;text="调节器";cls="button" };
button3={ bottom=72;text="设置分块文本";left=136;top=48;font=LOGFONT( name="宋体";h=-12 );z=2;right=264;cls="button" }
)
/*}}*/

import win.ui.statusbar;
var stat = win.ui.statusbar( winform );

winform.button.oncommand = function(id,event){
	var t = time(, "%H:%M:%S");
	stat.setText("现在的时间是：" + tostring(t));
}
winform.button2.oncommand = function(id,event){
	// 添加分块
	stat.addItem("a", 20);
}
winform.button3.oncommand = function(id,event){
	// 设置分块内容
	var i;
	for (i = 1; stat.getItemsNum(); 1)
		stat.setText( i, tostring(i) )
}
winform.button4.oncommand = function(id,event){
	// 调节器，自动根据窗体边框决定是否显示
	winform.modifyStyle( 0, 0x40000/*_WS_SIZEBOX*/ );
	stat.reset();
	stat = win.ui.statusbar( winform );
}

winform.show(true);
win.loopMessage();
