Skip to main content
AD�?b
Senior
Question

How to do it?

I have the OFF / ON button. I want one function in the system to be called when the button is pressed and another function is pressed. The button is set to TRIGGER / Toggle. How to do it?

This topic has been closed for replies.

8 replies

scottSD
Senior III

By "Off/On" I assume you mean Toggle Button?

I assume you know you about the "Interaction" section in the TouchGFX Designer?

What do you mean you "want one function in the system to be called when the button is pressed and another function is pressed." --how is another function "pressed"?

AD�?b
AD�?bAuthor
Senior

1. yes

2. yes

3. when the button is OFF, the system works in one mode, as it is ON, the system works in another mode.

Romain DIELEMAN
ST Employee

Hi, as @scottSD wrote you should get familiar with the interaction section in Designer. Have a look at Tutorial 2 section 4 to see how to set-up a button and a function when the button is clicked. A Toggle button and a simple button like the one in the tutorial are quite similar. You can then code as you want the function handling the button click event to have a specific function called depending on the state of the button ON/OFF.

/Romain

AD�?b
AD�?bAuthor
Senior

Hi!

I'll see. Thank you!