2018-12-18 02:12 AM
Hello,
regarding the documentation in Designer or on the website the two virtual functions scrollWheelUpdateItem and scrollWheelUpdateCenter (Designer doc) or scrollWheelUpdateCenterItem (Website doc) should be generated.
In my project only the first function scrollWheelUpdateItem is generated and the other one is missing.
I use the ScrollWheel in a custom container.
How can I add this missing function and could this issue be fixed in the designer in future?
Thanks a lot,
Daniel Schramm
Solved! Go to Solution.
2018-12-19 02:43 AM
Hi Daniel!
The UpdateCenterItem() virtual function is only generated for you in your base-view if you have selected a "Selected Style Template" for a Scroll Wheel in the designer as outlined in the screenshot below. Once you have that method generated, you can override it in the concrete implementation of that view.
The generated method updateItemCallbackHandler() will take care of calling both updateItem() and updateCenterItem() methods in your concrete implementation if you override them. The parameters for the callback handlers is (For scrollWheel1 with a Center Item template CustomContainer1).
virtual void scrollWheel1UpdateCenterItem(CustomContainer1&, int16_t itemIndex);
Hope that helps!
2018-12-19 02:43 AM
Hi Daniel!
The UpdateCenterItem() virtual function is only generated for you in your base-view if you have selected a "Selected Style Template" for a Scroll Wheel in the designer as outlined in the screenshot below. Once you have that method generated, you can override it in the concrete implementation of that view.
The generated method updateItemCallbackHandler() will take care of calling both updateItem() and updateCenterItem() methods in your concrete implementation if you override them. The parameters for the callback handlers is (For scrollWheel1 with a Center Item template CustomContainer1).
virtual void scrollWheel1UpdateCenterItem(CustomContainer1&, int16_t itemIndex);
Hope that helps!
2018-12-19 02:53 AM
Hello Martin,
activating "Selected Style Template" was the important hit.
Thanks for your quick help.
Daniel
2018-12-19 03:42 AM
Glad to be of help, Daniel!