cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746G-DISCO, STM32CubeIDE, TouchGFX, FreeRTOS

AD�?b
Senior

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?

4 REPLIES 4
Martin KJELDSEN
Chief III

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
Senior

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.

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 ();

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