Get the value of roller

Description

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

simulator

What LVGL version are you using?

v8.3

What do you want to achieve?

What is the basis for the roller to obtain the value it selects? Is it possible to manually add a certain state to dynamically obtain the value of the roller, during the rolling process.

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.

uint16_t lv_roller_get_selected(const lv_obj_t * obj)

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.

@kisvegabor

This is not supported now. :frowning:

Thanks for your reply, is there no other way for me to achieve this? If not, will this feature be added in the next version?

Yes, in v9 I’m planning to add some more events for roller to allow more customizations.

Until that, you can add the logic you need right into the roller widget. I know it’s not ideal, but I can say only this right now. :frowning:

Thanks for your reply, you’re doing a great job, I’m a newbie and slowly exploring.

1 Like