Skip to main content
ADębs.1
Senior
May 7, 2021
Solved

STM32F746G-Disco, GFX

  • May 7, 2021
  • 4 replies
  • 975 views

Hi

What is the difference between the Click, Touch, Toggle buttons?

Andrzej

This topic has been closed for replies.
Best answer by Romain DIELEMAN

The ToggleButtonTrigger.hpp file is found in Middlewares\ST\touchgfx\framework\include\touchgfx\containers\buttons\ToggleButtonTrigger.hpp

The "When Screen Transition Ends" trigger is the new name for what was previously called "When Screen Entered". This means that whatever you wish to do will start after you have finished going to another screen.

The "When Screen Transition Begins" trigger will trigger an action at the start of the transition from a screen to another.

So the difference is just if you wish to have the action take place before or after the transition has started.

4 replies

Romain DIELEMAN
ST Employee
May 10, 2021

Hi,

I believe you are looking at the different trigger options of a Flex button ?

  • The Click button is a button that reacts on click, which means that it will call the set action when the button is released.
  • The Touch button is a button that reacts on touches, which means that it will call the set action when you first press/touch the button (and not when released)
  • The Toggle button is a button that will be either in a pressed state or "normal" state, with the corresponding images.

You can read more about this in either the documentation on buttons, or directly through the generated code (for example in ToggleButtonTrigger.hpp or ClickButtonTrigger.hpp)

/Romain

ADębs.1
ADębs.1Author
Senior
May 10, 2021

Thank you.

I get it. Where can I find the ToggleButtonTrigger.hpp file?

How they work: Screen transition begins a how screen transition ends?

Andrzej

Romain DIELEMAN
Romain DIELEMANBest answer
ST Employee
May 10, 2021

The ToggleButtonTrigger.hpp file is found in Middlewares\ST\touchgfx\framework\include\touchgfx\containers\buttons\ToggleButtonTrigger.hpp

The "When Screen Transition Ends" trigger is the new name for what was previously called "When Screen Entered". This means that whatever you wish to do will start after you have finished going to another screen.

The "When Screen Transition Begins" trigger will trigger an action at the start of the transition from a screen to another.

So the difference is just if you wish to have the action take place before or after the transition has started.

ADębs.1
ADębs.1Author
Senior
May 10, 2021

Thanks for the precise explanation.

Andrzej