how to compare object's colors?

joseluis

Active Member
Licensed User
Longtime User
I'm not sure of what you want. Do you want to check if two Views has the same color?

B4X:
If Label.TextColor == Button.TextColor Then
    ' stuff...
End if
If not, please explain a little bit more what you want to do.
 
Upvote 0

sarkis

Member
Licensed User
Longtime User
Thanks for replying.
I nett to know what the particular color is , like
if someobject.color ==color.red
 
Upvote 0

sarkis

Member
Licensed User
Longtime User
I have panels of different colors.
I need to know what color is particular object.
Simply , how can I keep objects colors?
 
Upvote 0

sarkis

Member
Licensed User
Longtime User
particularly you cannot write

If Label.TextColor == Button.TextColor Then
' stuff...
End if
as color is write only
 
Upvote 0

kickaha

Well-Known Member
Licensed User
Longtime User
You could store the colour in the Tag of each label when you set it, that way you have a readable copy of the colour.
 
Upvote 0
Top