hello,
not using the designer (all layouts removed).
try this code on a new project :
B4X:
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private rb As RadioButton
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.BackColor=fx.Colors.Yellow
MainForm.Show
rb.Initialize("rb")
End Sub
without the last line, the form is yellow. the last line resets it to default gray that can't be changed anymore.
am i doing something wrong ?
Thank you
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private rb As RadioButton
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Show
CSSUtils.SetBackgroundColor(MainForm.RootPane,fx.Colors.Yellow)
rb.Initialize("rb")
MainForm.RootPane.AddNode(rb,0,0,30,30)
End Sub
Form.BackColor shouldn't be used in most cases. You should instead change the color of the root pane(l).
B4X:
Sub Process_Globals
Private MainForm As Form
Private xui As XUI
Private rb As RadioButton
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Show
Dim root As B4XView = MainForm.RootPane
root.Color = xui.Color_Yellow
rb.Initialize("rb")
End Sub
There is a strange issue here however it will work fine once you set the root panel color.