How to change the color of the slider point?

Description

How do I change the color of two slider dots?
I know that it is possible to change the color of both points (circles) through the function.

But how can I change the color of the dots (circle) separately?

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

win simulator

What LVGL version are you using?

9.2.2

What do you want to achieve?

A separate function is to change the color of the second circle in the slider.

What have you tried so far?

I’m thinking about how to change it

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:

lv_obj_t* slider = lv_slider_create( cont );
  lv_obj_set_height( slider, 10 );
  lv_obj_set_style_border_width( slider, 2, LV_PART_KNOB );
  lv_obj_set_style_border_color( slider, lv_palette_darken( LV_PALETTE_CYAN, 2 ), LV_PART_KNOB );

image

1 Like

Mean isnt poss, but for example gradient horizontal can differ it.
image

At the moment, I have this:
image
image

And I would like to get it like this:
image
And
image

Then simply rewrite lvgl slider.c and create what you need.

1 Like