Showing results for 
Search instead for 
Did you mean: 

TouchGFX color and other defines in designer.

Chief II

Hi, maybe i ask this some years ago, but still not resolved. 

In designer now cant create defines list for use instead constant numbers. Then can be quickly managed all objects.

Now for example i have designs with 150 labels and set some level of white color on every.

After design presented boss say require more darker or lighter texts, then start hard job click on every object and change color, instead we need change one define.

Exist any way to do it now, or is planned in next release ??


Accepted Solutions
ST Employee

Hello @MM..1 and @JTP1 ,

The feature has been discussed and we will try to implement solutions to modify multiple elements at once and to set defines from Designer. However, there is no timeline set for it yet.



Gaetan Godart
Software engineer at ST (TouchGFX)

View solution in original post

ST Employee

Hello @MM..1 ,


It is not possible at the moment to change one property of all elements of the same type (ex : change the color of all textArea) at the moment. There is no plan to add a feature to change the property of all element types as far as I know.

However, even if you set the color of some textArea from Designer, you can change them in your code using a define.
Please find an example of that attached to my message.
It requires a line for every label / textArea you wat to change by utilizing the setColor method (or setLabelColor).


Hope this helps.

Don’t hesitate to give us a feedback or give more precisions and tell us if the issue is solved! 😊

Gaetan Godart
Software engineer at ST (TouchGFX)

Sorry, but your solution is next waste instructions override base generated values. When around the world all programmer do this type of inteligent code , then bye bye CO2 green energy.

You are right, it add an extra 150 lines of code.
I can escalate the issue to my  team again. But if you already asked it before, it might be because we consider it's not a critical issue and it has a workaround through the code. Therefore it is not prioritized on our side.

Gaetan Godart
Software engineer at ST (TouchGFX)

MX generator have user defines many years. And this isnt 150 lines ... every set color isnt one ASM instruction.



I really hope this feature is coming to the next major release, there is urgent need for it. 


ST Employee

Hello @MM..1 and @JTP1 


Can you guys explain in more detail what feature you want us to implement?

  • Do you want to be able to select all elements from a screen at once?
  • Do you want the ability to select all the same elements at once (ex: all textArea, all flexButton, all SVGImages, etc)?
  • So far you are able to press ctrl then click on multiple elements of a screen (directly from the screen or from the left panel), then those elements are "linked" and you can move them together but the property panel on the right becomes empty even if you selected 2+ element of the same type (ex: 2 textArea, 2 flexButton, etc).
  • Do you want that, once you selected multiple element, you still can change their properties from the right panel for all the properties they have in common (ex1: you select 2 textArea, then you can change every properties and if you do, it will apply the changes to the 2 textAreas?) (ex2: you select 1 textArea and 1 flexButton, then you can change the properties they have in common such as position, size, alpha and mixins)?

Yes @MM..1 it will definitely take more than 150 assembler instructions.



Gaetan Godart
Software engineer at ST (TouchGFX)

Seems you still missunderstand. We ask add here


one next under Framework Features name it for example master include or defines and place for example one big text area where we write lines required for code. Colors is perfect example, but not only this.

All named constants entered here can be used in any value in designer. For example 


#define BASEYPOS 27


and swith to canvas 


we can fill instead #FFFFFF WHITE and instead location Y BASEYPOS

Result is we have 10 screens 1000 objects and when click Config and change defines value canvas show and use it immediately on all places.

Ofcourse WHITE here is only example , better def name is for example MASTERFGCOLOR etc.

ST Employee

@JTP1 is this also what you had in mind?

I want to make sure what feature you want before presenting it.



Gaetan Godart
Software engineer at ST (TouchGFX)

Hello Gaetan

Maybe I was thinking bit more complicated system where user could define colors and give names with some new color tool and then have also support for color themes directly in the TGFX Designer. And then the color theme could be changed just like now it is possible to change language at run-time.

But the MM..1 proposal also has a lot of good things, it is very versatile because it can be used to replace any parameter on the TGFX Designer. So I would be happy to see this 'free-constant' method in short term.