mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
32 lines
1.1 KiB
C
32 lines
1.1 KiB
C
//#include "../../lv_examples.h"
|
|
//
|
|
//static lv_obj_t * label;
|
|
//
|
|
//static void slider_event_cb(lv_obj_t * slider, lv_event_t event)
|
|
//{
|
|
// if(event == LV_EVENT_VALUE_CHANGED) {
|
|
// /*Refresh the text*/
|
|
// lv_label_set_text_fmt(label, "%d", lv_slider_get_value(slider));
|
|
// lv_obj_align(label, slider, LV_ALIGN_OUT_BOTTOM_MID, 0, 20); /*Align below the slider*/
|
|
// }
|
|
//}
|
|
//
|
|
///**
|
|
// * Create a slider and write its value on a label.
|
|
// */
|
|
//void lv_ex_get_started_3(void)
|
|
//{
|
|
// /* Create a slider in the center of the display */
|
|
// lv_obj_t * slider = lv_slider_create(lv_scr_act(), NULL);
|
|
// lv_obj_set_width(slider, 200); /*Set the width*/
|
|
// lv_obj_align(slider, NULL, LV_ALIGN_CENTER, 0, 0); /*Align to the center of the parent (screen)*/
|
|
// lv_obj_set_event_cb(slider, slider_event_cb); /*Assign an event function*/
|
|
//
|
|
// /* Create a label below the slider */
|
|
// label = lv_label_create(lv_scr_act(), NULL);
|
|
// lv_label_set_text(label, "0");
|
|
// lv_obj_align(label, slider, LV_ALIGN_OUT_BOTTOM_MID, 0, 20); /*Align below the slider*/
|
|
//}
|
|
//
|
|
//
|