2021-06-10 12:10 PM
Hello!
Look at the code
void CONTROL_SCREENView::setupScreen()
{
CONTROL_SCREENViewBase::setupScreen();
MovingSpeed_ScrollWheel.setAnimateToCallback(MovingSpeed_ScrollWheelAnimateToCallback);
MovingStep_ScrollWheel.setAnimateToCallback(MovingStep_ScrollWheelAnimateToCallback);
MovingStep_ScrollWheel.animateToItem(SETTINGS_IN_RAM.CONTROL_MOVE_DISTANCE);
MovingSpeed_ScrollWheel.animateToItem(SETTINGS_IN_RAM.CONTROL_MOVE_SPEED);
}
I enter to screen, and I can see how scrollwheel scrolls to position.
I want at first - scrolling to initial position, and than - screen show.
How to do it?
2021-06-11 12:45 AM
Hi,
In TouchGFX 4.16 you have in the "Interactions" settings a trigger called "Screen transition begins". This trigger will call whatever action you set before the screen you are going to is displayed.
Otherwise what you could do is set the scrollWheel to invisible when entering the screen, do the position change and then set it to visible (use the MovingSpeed_ScrollWheel.setVisible( true or false) function )
/Romain
2021-06-11 12:47 AM
Just realized you actually have the function implemented in the widget already, Look at the "Initial Selected Item" in the ScrollWheel widget settings.
/Romain
2021-06-11 06:16 AM
not works..... I got the same result....