cancel
Showing results for 
Search instead for 
Did you mean: 

How to change to the previous screen

Hwoo-
Associate II

Hi,

I want to do something like this:

1) receive button input from touchGFX

2) execute operations to be processed

3) switch to the previous screen or a specific screen.

​​

I run it as below, but the same screen appears.

void bookScreenOperView::operOKFunction()

{

  //report to presenter and update text

  presenter->userSetOperOK();

  bookScreenOperView::tearDownScreen();

}

How can I solve this problem ?

Best regards,​

2 REPLIES 2
Zwei.9
Associate III

Hi,

You can use touchgfx designer.Add a button,and then select "Change screen" for your expected screen.

If you want to do something between click button and change screen ,you should add new interaction which choose to execute C++ code.Remember to tick the box.And then add new interaction which use another interaction is done trigger to change screen.

Osman SOYKURT
ST Employee

Hello Hwoo-,

Zwei.9,'s answer looks pretty good, this is how we change screens with buttons. For more details, I invite you to follow this tutorial, it will show you how to implement that step by step.

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX