From a1996705df12ed7332139e13ae8d4e27d2dbf04e Mon Sep 17 00:00:00 2001 From: Liu Chao Date: Sun, 2 Sep 2012 22:21:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=BF=9B=E5=BA=A6=E6=9D=A1?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/test_progressbar.c | 63 +++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/test/test_progressbar.c b/test/test_progressbar.c index b3772951..39be6afc 100644 --- a/test/test_progressbar.c +++ b/test/test_progressbar.c @@ -1,10 +1,10 @@ - //测试进度条部件的示例程序 #include #include LC_LCUI_H #include LC_WIDGET_H #include LC_WINDOW_H #include LC_GRAPHICS_H +#include LC_LABEL_H #include LC_RES_H #include LC_WORK_H #include LC_MISC_H @@ -14,47 +14,56 @@ #include #include #include -void *change_progress(void *arg) -/* 功能:动态改变label部件的文本内容 */ + +void *change_progress_1(void *arg) +/* 功能:动态改变进度条部件的数据 */ { - int i, max; - max = 100; + int i, max = 100; + LCUI_Widget *label; LCUI_Widget *widget = (LCUI_Widget *)arg; /* 转换类型 */ + + label = Create_Widget("label"); + Widget_Container_Add(widget, label); + label->set_align(label, ALIGN_MIDDLE_CENTER, Pos(0,0)); + label->show(label); Set_ProgressBar_Max_Value(widget, max); /* 最大值 */ srand(time(NULL)); for(i=0; iset_align(label, ALIGN_MIDDLE_CENTER, Pos(0,0)); + label->show(label); + Set_ProgressBar_Max_Value(widget, max); + srand(time(NULL)); + for(i=0; i