cancel
Showing results for 
Search instead for 
Did you mean: 

scrolwheel. How to animate before screen enter?

EEuge
Senior

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?

3 REPLIES 3
Romain DIELEMAN
ST Employee

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

Romain DIELEMAN
ST Employee

Just realized you actually have the function implemented in the widget already, Look at the "Initial Selected Item" in the ScrollWheel widget settings.

/Romain

not works..... I got the same result....