Press-Lock parts of a widget

We have a slider within a scrollable panel in our user interface.

We enabled press-lock on the slider so you can touch and adjust the knob even if your finger goes off the widget slightly. However, sometimes press-lock triggers when scrolling the panel, which then changes the slider position directly and stops scrolling.

I think a better solution would be to allow enabling press-lock on just, LV_PART_KNOB, though I don’t think this could be done currently as press-lock is a per-widget flag and does not apply to a part of a widget.

1 Like

Hi,

Actually you can do it by adding lv_obj_add_flag(slider, LV_OBJ_FLAG_ADV_HITTEST);.

Let me know how it worked. :crossed_fingers:

It works wonderfully Gabor!

Amazing! :tada: