2024-02-19 07:44 AM
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 ??
Solved! Go to Solution.
2024-03-01 01:19 AM
2024-02-20 06:22 AM
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:
2024-02-20 08:15 AM
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.
2024-02-20 08:59 AM
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.
2024-02-20 09:15 AM
MX generator have user defines many years. And this isnt 150 lines ... every set color isnt one ASM instruction.
2024-02-20 09:21 AM
Hello
I really hope this feature is coming to the next major release, there is urgent need for it.
Br JTP
2024-02-21 03:12 AM
Can you guys explain in more detail what feature you want us to implement?
Yes @MM..1 it will definitely take more than 150 assembler instructions.
Regards,
2024-02-21 05:12 AM - edited 2024-02-21 05:14 AM
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 WHITE #FFFFFF
#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.
2024-02-26 02:39 AM
@JTP1 is this also what you had in mind?
I want to make sure what feature you want before presenting it.
Regards,
2024-02-26 08:31 AM
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