cancel
Showing results for 
Search instead for 
Did you mean: 

How to know if a flexbutton has been previously pressed ? (button tag)

Emilmart
Senior

Hi everyone,

I have a button (flexbutton), that should triggers a different action depending on his previous state. For instance, my button should light on or light off a light, depending on his previous state. If the button was previously activated, it switchs the light off, and vice-versa.

In WPF I used a proprety called "tag", which was changing depending on the user actions, but is such thing or similar available in TouchGFX ?

I don't want to use toggle buttons, multiple buttons or create a variable in code.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
ktrofimo
Senior III

Sorry, but you have to write this code. Flex button doesn't keep own state ​like Toggle button does. I would suggest to use C++ member inside View class. Or you can use Toggle button with other bitmaps if you do not like existing ones (designer has some styling options).

View solution in original post

2 REPLIES 2
ktrofimo
Senior III

Sorry, but you have to write this code. Flex button doesn't keep own state ​like Toggle button does. I would suggest to use C++ member inside View class. Or you can use Toggle button with other bitmaps if you do not like existing ones (designer has some styling options).

ok thanks, good alternative, hope a tag feature will come in the next release!