Skip to main content
danielschramm9
Associate II
December 18, 2018
Solved

Schroll Wheel - UpdateCenter missing

  • December 18, 2018
  • 3 replies
  • 1095 views

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

This topic has been closed for replies.
Best answer by Martin KJELDSEN

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

3 replies

Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
December 19, 2018

​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
December 19, 2018

Hello Martin,

activating "Selected Style Template" was the important hit.

Thanks for your quick help.

Daniel

Martin KJELDSEN
Principal III
December 19, 2018

Glad to be of help, Daniel​!