B4J Question MainForm.BackColor Problem

bdunkleysmith

Active Member
Licensed User
Longtime User
Any suggestions as to why in an application where I have the code:
B4X:
MainForm.BackColor = fx.Colors.blue
that on a PC running Java 7 the form background is indeed blue, but on other PCs running Java 8 the code does not change the background and it remains white?
 

rwblinn

Well-Known Member
Licensed User
Longtime User
Hi,

have checked following using Java 8:
if no Layout is loaded for a MainForm the Background is blue when using BackColor.
When a Layout is loaded, the BackColor is not set to Blue.
To change the BackColor, have used RootPane Style which works:

B4X:
MainForm.RootPane.Style = "-fx-background-color: blue;"
 
Upvote 0
Top