Some questions about Slider object


How to set the Slider vertical or horizontal?

How to hide the knob in the slider, so that it just an indic show?

How to disable the sliders slider, I don’t want it can slide.

What MCU/Processor/Board and compiler are you using?

What do you want to achieve?

What have you tried so far?

Code to reproduce

Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.

The code block(s) should be formatted like:

/*You code here*/

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

How to set the Slider vertical or horizontal?
If you set x dimension minor then y automatically you have vertical slider, and viceversa.

Use a bar instead.

Using lv_obj_set_click(slider, false) should work.

Hi,my littlevgl’s version is 6.0, and I found the docs about bar, it says

The orientation of the bar can be vertical or horizontal according to the width/height ratio.

so it means if I want to set the orientation of a bar, I should set the width/height ratio lower?
such as width 20 and height 200?

That’s correct.

Hi, if i use bar instead of slider to hide the knob so how can i drag to change bar value indicator like using knob in slider

How do you disable a slider for LVGL 8?