the rollers dont send “LV_EVENT_VALUE_CHANGED” when changing them using keypad. i have to use enter to make it send the appropriate event. changing its value using mouse works fine. but with keypad, an enter is neccesary for it to work.
to fix this i had to add a line in “lv_roller.c” class.
in the method “lv_roller_set_selected” which is called upon using arrow keys to change the roller value.
line 190 before curly brackets i added this
lv_obj_send_event(obj, LV_EVENT_VALUE_CHANGED, NULL);
Hey, rollers arent supposed to send LV_EVENT_VALUE_CHANGED everytime you scroll him, just when you press enter as said in this page of the forum about rollers.
And what is your objective sending every time an event? you wanna sort it out the option that is being selected?
im using rollers as a menu option in my ui. changing its value changes the options. for example if i put the roller to ipv6 only ipv6 options would show up in the menu. but there are no options to check for this. atleast something like “onScrollEnded” would be helpful. but no single event would show up. only some draw calls and multiple of each.
to be more precise.
i added rollers in my menus as one line intractables (only one option is visible).
i want to be able to update my menu based on values of rollers. unfortunately no event to mapped to scrolling using keyboard.
apparently this is a common problem, since scrolling with mouse works fine.
what you can do (that is what i use to do something similar), is to create a function that runs in the background when an specific screen is displaying, in that function you can verify if the roller is in a specific position using:
lv_roller_get_selected(/*the object of the roller*/);
it will returns the showing option in the roller and you can change the screen based in this.