P positrom2 Active Member Licensed User Longtime User Aug 4, 2014 #1 The canvas background color is not changed by any of those lines commented (when uncommenting). B4X: Sub AppStart (Form1 As Form, Args() As String) MainForm = Form1 cvs.Initialize("cvs") MainForm.RootPane.AddNode(cvs, 0, 0,200,200) 'MainForm.Width/2, MainForm.Height/2) 'MainForm.BackColor=fx.colors.Green 'drawrect(0,0,cvs.Width,cvs.Height/2,fx.colors.yellow,True,0) 'cvs.style="-fx-background-color: yellow" How to set the background color?
The canvas background color is not changed by any of those lines commented (when uncommenting). B4X: Sub AppStart (Form1 As Form, Args() As String) MainForm = Form1 cvs.Initialize("cvs") MainForm.RootPane.AddNode(cvs, 0, 0,200,200) 'MainForm.Width/2, MainForm.Height/2) 'MainForm.BackColor=fx.colors.Green 'drawrect(0,0,cvs.Width,cvs.Height/2,fx.colors.yellow,True,0) 'cvs.style="-fx-background-color: yellow" How to set the background color?
Daestrum Expert Licensed User Longtime User Aug 4, 2014 #2 B4X: canvas1.DrawRect(0,0,canvas1.Width,canvas1.Height,fx.Colors.Red,True,1) Upvote 0
P positrom2 Active Member Licensed User Longtime User Aug 4, 2014 #3 Thank you Daestrum, it works now. Upvote 0