Is there a direct way to set the background color of "views"?
(or a better solution compared to the following, which I do not like "too much")
I wrote and suggested these two routines (and you could suggest better names for them
) I'm not devoting time to b4j, only to a server without GUI, then I'm not an expert, absolutely.
[Also, probably there is a method to pass "views" as parameters and...]
(or a better solution compared to the following, which I do not like "too much")
I wrote and suggested these two routines (and you could suggest better names for them
B4X:
Button1.Style = SetStyleBackground(fx.Colors.Red)
...
' "SetStyle" because I thought to pass the "view"
Sub SetStyleBackground(Color As Object) As String
Return "-fx-background-color:" & StyleColorString(Color)
End Sub
Sub StyleColorString(FXColor As String) As String
Return "#" & FXColor.SubString(2) & ";"
End Sub
[Also, probably there is a method to pass "views" as parameters and...]
Last edited: