cancel
Showing results for 
Search instead for 
Did you mean: 

Using Triggers and Actions

Priyank
Associate II

Hi I am having some trouble regarding using actions and triggers. I've been following the Tutorial 5 from the support website to use them, but I could use some suggestions regarding my situation.

I have a container which is a button which appears 4 times on 1 screen.

I want the container, when clicked to emit a value to the screen. 

When I try to emit a value of my choosing . What are my options as to what I can emit? I don't mean data types, but I mean data. Earlier when I tried to emit a variable from the model.cpp, it said it cannot emit that because the variable is not apart of the containers generated base code. Is this true, that only data found in the base file of the container can be emitted?

1 REPLY 1
GaetanGodart
ST Employee

Hello @Priyank ,

 

It is possible to send a data (a variable) from a custom container to the screen that it is in.

Since your custom container is meant to act as a button, maybe this tuto would help you.

Otherwise, you can have a look at the color picker example, see attached files.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)