STM32F746G-DISCO, GFX, STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-31 11:29 AM
I have a screen and two buttons.
With one I change the value, e.g. uint8_t sec. The other one changes the screen.
How to set that when sec = 0 it is impossible to change the screen. It could be changed with other sec values.
greetings
Andrzej
Solved! Go to Solution.
- Labels:
-
STM32F7 Series
-
TouchGFX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-01 5:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-01 3:27 AM
Hi,
I suppose you are currently using an Interaction with as Action "Change screen" when the button is pressed ? If yes one way to do this could be to use for this same Interaction as Trigger a fake "Hardware button is clicked" instead of the button. You then create another Interaction with as Trigger the real button and as Action "Call new virtual function". Then in code you just need to overwrite this function in your <screen name>View.cpp with something like this for example:
void Screen1View::function_changeScreen()
{
if (sec != 0 )
{
application().gotoScreen2ScreenNoTransition();
}
}
I'll attach a small example.
/Romain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-01 4:41 AM
Thank you. What can open this file?
Andrzej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-01 4:44 AM
It is just a zip file, so any zip tool can be used
/Romain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-01 4:54 AM
Checking.
Andrzej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-01 5:12 AM
I do not know. I have an Acer laptop, Window 10, and I'm using the file explorer. I downloaded the program and saved it. He saved himself as blockTransition plik7Z. But in the exploiter, it slides to open as txt.
Andrzej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-01 5:23 AM
zip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-01 5:25 AM
Not a 7Z but a zip.
Andrzej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-01 5:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-01 8:04 AM
Thank you.
Is OK
Andrzej
