cancel
Showing results for 
Search instead for 
Did you mean: 

Schroll Wheel - UpdateCenter missing

danielschramm9
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

​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.

 0690X000006CsKXQA0.png

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!

View solution in original post

3 REPLIES 3
Martin KJELDSEN
Chief III

​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.

 0690X000006CsKXQA0.png

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!

danielschramm9
Associate II

Hello Martin,

activating "Selected Style Template" was the important hit.

Thanks for your quick help.

Daniel

Martin KJELDSEN
Chief III

Glad to be of help, Daniel​!