cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX Scroll-wheel issues

DEtie.2
Associate

I'm trying to implement the scroll wheel, I've followed this example: https://support.touchgfx.com/docs/development/ui-development/ui-components/containers/scroll-wheel

The scrollwheel is configured with the Selected Template Style.

There is my override methods:

void CurrentCalView::RangeListUpdateItem(NavigateItem& item, int16_t itemIndex)
{
	Unicode::UnicodeChar t[10];
	Unicode::snprintfFloat(t, 10, "%.1f A", ranges[itemIndex]);
	item.setText(t);
}
 
void CurrentCalView::RangeListUpdateCenterItem(NavigateItemSelected& item, int16_t itemIndex)
{
	Unicode::UnicodeChar t[10];
	Unicode::snprintfFloat(t, 10, "%.1f A", ranges[itemIndex]);
	item.setText(t);
}

While the non-selected item displays properly, the selecteditem does not. It seems to display random items.

The menu is moved using RangeList.animateToItem

Digging a bit in the code, I found out that the GFX generates the code as follow (10 items is configured in the GFX):

touchgfx::ScrollWheelWithSelectionStyle RangeList;
    touchgfx::DrawableListItems<NavigateItem, 8> RangeListListItems;
    touchgfx::DrawableListItems<NavigateItemSelected, 2> RangeListSelectedListItems;

Is that issue is caused by the fact that selected item is set to 2? Shouldn't be 10? Why 2?

0 REPLIES 0