B4J Question [SOLVED] xui.PaintOrColorToColor - reverse function?

LucaMs

Expert
Licensed User
for some strange reason
The reason is very clear: I'm a bit confused :D:(

Actually what I'm doing is saving a map of preferences (using B4XSerializator) and one of them is the MainForm back color, which is a Paint object.

B4X:
mMainFormColor = mmapPref.GetDefault("MainFormColor", xui.Color_Green)
At this point I don't know how to set the MainForm.BackColor to mMainFormColor.
 

LucaMs

Expert
Licensed User
(here it is nearly a different question... I don't know if I should open a new thread).

I tried directly:

MainForm.BackColor = fx.Colors.From32Bit(xui.Color_Blue)

but this has no effects.

Strangely, BackColor requires a Paint object and From32Bit returns a javafx.scene.paint.Color, which is accepted but, as I said, the MainForm back color does not change.
 
Top