2025-04-30 2:05 AM - edited 2025-04-30 2:19 AM
I have a series of interactions that shows/hide widgets on the screen. The interactions are basically triggered when a button is clicked and are all managed via TouchGFX Designer.
Is there a way to trigger them via code, so like generate a virtual click on a button via code, instead of actually clicking the screen?
For istance I have an interaction named yesHideSaveSettingsModalWindows that, when it's done, trigger another interaction called showSavedLanguagemodalWindow
Is there a way to manually trigger showSavedLanguagemodalWindow ?
Solved! Go to Solution.
2025-05-01 2:36 AM
Hello @nico23,
With the way thing are generated with interaction triggered by other interaction in TouchGfx ,this is not possible. Another will be to have a separated function, i.e showSavedLanguagemodalWindow() that will be called instead and specified in your action as call new virtual function. With this solution you will also need to code manual the "Show widget". In that case that's rather easy :
void showSavedLanguagemodalWindow()
{
savedSettingsModalWindow.setVisible(false);
savedSettingsModalWindow.invalidate();
}
The good thing about that is that you can call showSavedLanguagemodalWindow() whenever you need it your code independently from the interaction.
BR,
2025-05-01 2:36 AM
Hello @nico23,
With the way thing are generated with interaction triggered by other interaction in TouchGfx ,this is not possible. Another will be to have a separated function, i.e showSavedLanguagemodalWindow() that will be called instead and specified in your action as call new virtual function. With this solution you will also need to code manual the "Show widget". In that case that's rather easy :
void showSavedLanguagemodalWindow()
{
savedSettingsModalWindow.setVisible(false);
savedSettingsModalWindow.invalidate();
}
The good thing about that is that you can call showSavedLanguagemodalWindow() whenever you need it your code independently from the interaction.
BR,
2025-05-04 11:37 PM
Hi @LouisB ,
thanks for the answer! A small problem is that I have a chain of interactions triggered after that one so, I have to assest if I can code everything manually.