EDIT:
My bad, see post#5.
Attached the correct routine B4J_KCButtonsDemoNew.
KCButtonsDemo is the wrong one.
I am writing a CustomView class.
Adding the CustomView in the Designer works perfectly, but trying to add them in code doesn't work.
I get this error:
MainForm.RootPane.AddNode(btnTest3, 190, 200, 60, 40)
Is there a technical reason why it doesn't work ?
My bad, see post#5.
Attached the correct routine B4J_KCButtonsDemoNew.
KCButtonsDemo is the wrong one.
I am writing a CustomView class.
Adding the CustomView in the Designer works perfectly, but trying to add them in code doesn't work.
I get this error:
when I try to add the CustomView in this line:B4J version: 4.20 (1)
Parsing code. (0.01s)
Compiling code. (2.33s)
Compiling layouts code. (0.00s)
Compiling generated Java code. Error
B4J line: 27
MainForm.RootPane.AddNode(btnTest3, 190, 200, 60,
javac 1.8.0_92
src\b4j\example\main.java:98: error: incompatible types: kcbutton cannot be converted to Node
_mainform.getRootPane().AddNode((javafx.scene.Node)(_btntest3),190,200,60,40);
MainForm.RootPane.AddNode(btnTest3, 190, 200, 60, 40)
Is there a technical reason why it doesn't work ?
Attachments
Last edited: