Skip to main content
MM..1
Chief III
February 19, 2024
Solved

TouchGFX color and other defines in designer.

  • February 19, 2024
  • 6 replies
  • 2385 views

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 ??

This topic has been closed for replies.
Best answer by GaetanGodart

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.

 

Regards,

6 replies

GaetanGodart
Technical Moderator
February 20, 2024

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! :smiling_face_with_smiling_eyes:

MM..1
MM..1Author
Chief III
February 20, 2024

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.

GaetanGodart
Technical Moderator
February 20, 2024

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.

Graduate II
February 20, 2024

Hello

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

Br JTP

GaetanGodart
Technical Moderator
February 21, 2024

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.

 

Regards,

MM..1
MM..1Author
Chief III
February 21, 2024

Seems you still missunderstand. We ask add here

MM1_0-1708520581540.png

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 WHITE #FFFFFF
#define BASEYPOS 27

 

and swith to canvas 

MM1_1-1708520960115.png

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.

GaetanGodart
Technical Moderator
February 26, 2024

@JTP1 is this also what you had in mind?

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

 

Regards,

Graduate II
February 26, 2024

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.

Br JTP

GaetanGodart
Technical Moderator
February 26, 2024

Thank you for your answer @JTP1 .

The theme solution seems hard to set up indeed.
We will discuss @MM..1 's proposition of constants inside Designer this week.

Regards,

GaetanGodart
GaetanGodartBest answer
Technical Moderator
March 1, 2024

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.

 

Regards,