Change default color of all label

Hi, I have all the labels with the default color set. So I see them all black. I can change the color of each label by setting them all in the desired color. But can you change the default color which is default? In this way, changing it with an instruction all the labels would change color.
Thanks

Currently, no, but in a later version, when we will be able to duplicate components, then yes.

In the meantime you can perform a loop change using an “any component” Block.

1 Like

This is what I currently do.
But I ask for another thing.
What is the default color of a label in TextColor?
And this default that applies to all labels, what is it?
Can you change the default value only once so that all the labels that have set in TextColor = default change the color?
I hope I was clear. I apologize but I know very little English …

I think I already replied :slight_smile:, if you scroll-up to my initial response.

To explain further - there is no default colour to begin with (color = none) , so if you were hoping to modify a background file (Screen.scm) you would only find a colour to change if a colour had previously been applied - and each individual label has it’s own value, even if they are all using the same colour. So, for now, Any Component is the most efficient way.

Thanks ChrisWard, I had read your initial answer but I thought I said it wrong.
I have a doubt: when label setting is TextColor = none there is no color set but if I set TextColor = default which color is used?
This is the color that I would like to change in Screen1.Initialize.
Thanks again

Hi Biagio

That default is not an App Inventor default - its the default of the theme being used by the Android Device (Phone).

Unless I am missing something here:

In testing, the default colours for background and text of a label, in ALL themes:

Background Colour = [255,255,255,0]
Text Colour = [0,0,0,0]

As Chris has indicated, the “actual” colour set, when a label is default colours, is dictated by the theme of the device, thus when the Dark theme is selected, the default colours are still as above, however, the background colour is “empty” and the text colour is “white”.

I suggest you use an extra label as reference, set to default colours, then use its properties to set the other labels…

If you want to set the colours to actually what you want to see on the device, thus avoiding the theme, you will have to workaround and remove the opacity number from the colours:

[255,255,255]
[0,0,0]

Thanks TIMAI2.
I solved the problem as above but it is not clear to me why it is not possible to change the default value.
And I like to understand … :slight_smile:
What I understand is that the default color is that of the Theme used. So if a Theme has the color red all labels (TextColor = Default) will be red.
It’s correct?
So when the label is displayed it already has a color.
I thought it could be set at the beginning of the application to modify this color.
The theme cannot be changed?

Yes

No

It can, as I indicated in my previous post, but it won't become the default colour, it will be the colour you set.

OK thanks.
In my app there are already over 200 labels and they will become more than 700 …
It is not easy to insert them in a list … then you delete some, insert others …
I need my app to interface with more than 200 tables in a MySql database. That’s why so many labels … :grinning:

it looks like you should redesign your app...
you not really need 700 labels to display some information, what about using only a few labels and reusing them to display different information?
also you could display a result in the webviewer, see for example App Inventor Tutorials and Examples: Dynamic Table Layout | Pura Vida Apps

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Hi Taifun,
I know your extensions, I use some of them.
But I don’t just have to see the data but change it and more. Many tables are related and when I change the values ​​I need to see other data. And I already do this by running php scripts.
I think the solution is to use a single vertical arrangement to manage many tables that are similar in structure and then manage the more complex ones separately.
Thank you too.
In this forum I am finding many people who help you and this is very nice!
Biagio

With 200 tables, you may need to treat the schemas for your tables themselves as data.

Yes, I believe that will be the solution.
Now I am trying with about twenty tables and I have created a list for each table with the names and characteristics of the fields. On a single mask I make visible some textboxes how many fields are in the table. I check the fields and then save.
I am having problems with the POST method. With GET it always works with POST the first time yes and then no.
But perhaps it is better that I open another post for this topic.
Thanks