update scrollbar widget.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@835 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
afe4c3cc61
commit
2e0297c527
|
@ -3,15 +3,14 @@
|
||||||
#include <rtgui/widgets/label.h>
|
#include <rtgui/widgets/label.h>
|
||||||
#include <rtgui/widgets/scrollbar.h>
|
#include <rtgui/widgets/scrollbar.h>
|
||||||
|
|
||||||
static rtgui_scrollbar_t* hbar;
|
|
||||||
static rtgui_scrollbar_t* vbar;
|
|
||||||
|
|
||||||
rtgui_view_t *demo_view_scrollbar(rtgui_workbench_t* workbench)
|
rtgui_view_t *demo_view_scrollbar(rtgui_workbench_t* workbench)
|
||||||
{
|
{
|
||||||
rtgui_view_t *view;
|
rtgui_view_t *view;
|
||||||
rtgui_rect_t rect;
|
rtgui_rect_t rect;
|
||||||
rtgui_label_t *label;
|
rtgui_label_t *label;
|
||||||
|
rtgui_scrollbar_t* hbar;
|
||||||
|
rtgui_scrollbar_t* vbar;
|
||||||
|
|
||||||
/* create a demo view */
|
/* create a demo view */
|
||||||
view = demo_view(workbench, "ScrollBar View");
|
view = demo_view(workbench, "ScrollBar View");
|
||||||
|
|
||||||
|
@ -37,6 +36,8 @@ rtgui_view_t *demo_view_scrollbar(rtgui_workbench_t* workbench)
|
||||||
rect.y1 += 18 + 5; rect.y2 = rect.y1 + 150;
|
rect.y1 += 18 + 5; rect.y2 = rect.y1 + 150;
|
||||||
vbar = rtgui_scrollbar_create(RTGUI_VERTICAL, &rect);
|
vbar = rtgui_scrollbar_create(RTGUI_VERTICAL, &rect);
|
||||||
rtgui_container_add_child(RTGUI_CONTAINER(view), RTGUI_WIDGET(vbar));
|
rtgui_container_add_child(RTGUI_CONTAINER(view), RTGUI_WIDGET(vbar));
|
||||||
|
rtgui_scrollbar_set_line_step(vbar, 1);
|
||||||
|
// RTGUI_WIDGET_DISABLE(RTGUI_WIDGET(vbar));
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue