B4J Question How can i change a label's background color?

kalarius

Active Member
Licensed User
Longtime User
Hi there

I want to change the background color of a label using the following code.

Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim ready Is Boolean = False
Private ReadyLb As Label
End Sub

Sub CheckReady As Boolean
If ready = True Then
ReadyLb.Color = RGB(111,242,142)
End If
End Sub
 

DonManfred

Expert
Licensed User
Longtime User
Please use [CODE]code here...[/CODE] tags when posting code.

codetag001.png

codetag002.png

codetag003.png
 
Upvote 0

Colin Evans

Active Member
Licensed User
Longtime User
Hi Erel, I want to change the background color of various labels depending on certain factors, I'm using B4J but can't seem to find a way and cannot follow your suggestion in #3, I've added jXUI but how do I change its type to B4XView

Sorry found the answer in one of your other replies

Dim x As B4XView = YourLabel
x.Color = 0xFF18F900

Thank you
 
Last edited:
Upvote 0
Top