mirror of
https://github.com/lvgl/lvgl.git
synced 2026-06-01 00:51:49 +08:00
fix(examples) correct comment in slider example (#3419)
The label is above the slider in this example, not below it.
This commit is contained in:
committed by
GitHub
parent
e651383688
commit
8d8aaed0e3
@@ -23,7 +23,7 @@ void lv_example_get_started_3(void)
|
||||
lv_obj_center(slider); /*Align to the center of the parent (screen)*/
|
||||
lv_obj_add_event_cb(slider, slider_event_cb, LV_EVENT_VALUE_CHANGED, NULL); /*Assign an event function*/
|
||||
|
||||
/*Create a label below the slider*/
|
||||
/*Create a label above the slider*/
|
||||
label = lv_label_create(lv_scr_act());
|
||||
lv_label_set_text(label, "0");
|
||||
lv_obj_align_to(label, slider, LV_ALIGN_OUT_TOP_MID, 0, -15); /*Align top of the slider*/
|
||||
|
||||
@@ -14,7 +14,7 @@ slider.set_width(200) # Set the wid
|
||||
slider.center() # Align to the center of the parent (screen)
|
||||
slider.add_event_cb(slider_event_cb, lv.EVENT.VALUE_CHANGED, None) # Assign an event function
|
||||
|
||||
# Create a label below the slider
|
||||
# Create a label above the slider
|
||||
label = lv.label(lv.scr_act())
|
||||
label.set_text("0")
|
||||
label.align_to(slider, lv.ALIGN.OUT_TOP_MID, 0, -15) # Align below the slider
|
||||
|
||||
Reference in New Issue
Block a user