Unfortunately you don't give enough information.
Do you initialize the Label in the code, you shouldn't ?
What is the background color behind the Label, if it's red you wont see the text ?
Do you have some text in the Label ?
Could you post a small project showing the problem ?
Unfortunately you don't give enough information.
Do you initialize the Label in the code, you shouldn't ?
What is the background color behind the Label, if it's red you wont see the text ?
Do you have some text in the Label ?
Could you post a small project showing the problem ?
The problem is that the color set in the layout does not change.
I have various labels in layout (via designer), then, in code i have, for each label, the declaration (Dim) and the text:
B4X:
Dim notesLabel As Label
notesLabel.text ="Title"
and i have to set forecolor (for ex. red) with:
B4X:
notesLabel.TextColor = Colors.Red
but the color set in the layout does not change...
Dim is already in the Globals...
and if i not declare variable in globals, i have this error when i try to use it: Error description: Undeclared variable 'noteslabel' is used before it was assigned any value.
For EditText instead work correctly..
In this case, if I want to change the forecolor, I must necessarily remove the labels from layout and draw all the labels via code (without using the designer)?
I have set two views, a Label and an EditText view in the Designer with TextColor = Blue.
Then I changed their TextColor properties to Colors.Red in the code.
The color is changed on the screen but no change in the Designer, as expected.
I have set two views, a Label and an EditText view in the Designer with TextColor = Blue.
Then I changed their TextColor properties to Colors.Red in the code.
The color is changed on the screen but no change in the Designer, as expected.