Skip to main content
AD�?b
Senior
May 29, 2020
Question

STM32F746G-DISCO, STM32CubeIDE, TouchGFX, FreeRTOS

  • May 29, 2020
  • 2 replies
  • 849 views

There is a "click" button on the screen. The status of this button is sent to the user program. There is a second "toggle" button on the screen. The first button must put the second button in a non-pressed state if it was depressed. the user program (main.c) must make the decision. How to do it?

This topic has been closed for replies.

2 replies

Martin KJELDSEN
Principal III
June 2, 2020

Take a look at the webinar that is posted at the top of this forum as a sticky - Here i go through how to turn on an LED from the UI and how to trigger an animation in the UI using a physical button. The same would apply here, except you're sending a message out of the UI and into the UI again to enable the second button.

AD�?b
AD�?bAuthor
Senior
June 2, 2020

In the end I solved this problem by blocking the screen change button:

if (ButtonDown.getPressed () == true)

ButtonBack.setVisible (false);

else

ButtonBack.setVisible (true);

ButtonBack.invalidate ();

Martin KJELDSEN
Principal III
June 2, 2020

Okay, i completely misunderstood what you wanted to do :)

AD�?b
AD�?bAuthor
Senior
June 2, 2020

There is a problem with it in my case.

I have ButtonBack (toggle) and other buttons (toggle).

ButtonBack changes the screen.

I need to hurt the screen change where other buttons are attached. I tried in many ways but to no avail.