B4J Question UI lost color setting

kabron

Member
Licensed User
Longtime User
Sorry, if I repeated the question, but I had not find similar.

The question is: when I launch program form IDE(Release/Debug) everything is OK.(Left pic.)
But if I run the same program as a .jar application, it losts all color settings(Right pic.).

It happens on Win7 x64 while OK on Win8.1 x32.

So, what is wrong and what to do?
b4j_Bug.jpg
 

kabron

Member
Licensed User
Longtime User
Color settings are in main.fxml and Start.fxml. I guess it's enough.
BTW, I tryed to set colors in the code with no result.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You are adding a Canvas object that covers the whole form. You should set its color:
B4X:
Sub AppStart (Form1 As Form, Args() As String)
   MainForm = Form1   
   MainForm.RootPane.LoadLayout("Start")   
   MainForm.BackColor = fx.Colors.Black   
   Screen.Initialize("Screen")
   
  MainForm.RootPane.AddNode(Screen, 0, 0, MainForm.Width, MainForm.Height)
   Screen.DrawRect(0, 0, Screen.Width, Screen.Height, fx.Colors.Black, True, 0)
 
Upvote 0

kabron

Member
Licensed User
Longtime User
Thank you, Erel, this works!
But still a questions:
Why it always works in Win8.1 x32 and under IDE in Win7 x64 without Screen.DrawRect()?
 
Upvote 0
Top