How to change drawing direction of slider widget???

  • According to the LVGL documenation, it says as “To specify the range (min, max values), lv_slider_set_range(slider, min, max) can be used. The default range is 0…100, and the default drawing direction is from left to right in horizontal mode and bottom to top in vertical mode. If the minimum value is greater than the maximum value, like 100…0, the drawing direction changes to the opposite direction.”
  • I would like to reverse the drawing direction of the slider and I did by the LVGL documentation, but it did not work. When I set the range as 100…0, the knob is at the maximum position and it does not move.
  • I’m using LVGL v8.3.11 and I tested on mimxrt1170-evk board.
  • The followings are the source code of mine, and it is almost same as the example source code of LVGL.
{
    ui_Slider3 = lv_slider_create(ui_Screen1);
    lv_slider_set_value(ui_Slider3, 50, LV_ANIM_OFF);
    if(lv_slider_get_mode(ui_Slider3) == LV_SLIDER_MODE_RANGE) lv_slider_set_left_value(ui_Slider3, 0, LV_ANIM_OFF);
    lv_obj_set_width(ui_Slider3, 20);
    lv_obj_set_height(ui_Slider3, 350);
    lv_obj_set_x(ui_Slider3, 200);
    lv_obj_set_y(ui_Slider3, 0);
    lv_obj_set_align(ui_Slider3, LV_ALIGN_CENTER);
    lv_slider_set_range(ui_Slider3, 100, 0);
}