microbox Active Member Licensed User Longtime User Jul 15, 2016 #1 Hi everyone, I'm trying the latest version of B4J. I created a form with a button. But when running the program there is only a blank form. I also make sure that I'm calling the correct layout... Am I missing something? Code: #Region Project Attributes #MainFormWidth: 400 #MainFormHeight: 400 #End Region Sub Process_Globals Private fx As JFX Private MainForm As Form Private btnmsg As Button End Sub Sub AppStart (Form1 As Form, Args() As String) MainForm = Form1 MainForm.SetFormStyle("UNIFIED") MainForm.RootPane.LoadLayout("Layout1") MainForm.Show Thanks in advance, microbox
Hi everyone, I'm trying the latest version of B4J. I created a form with a button. But when running the program there is only a blank form. I also make sure that I'm calling the correct layout... Am I missing something? Code: #Region Project Attributes #MainFormWidth: 400 #MainFormHeight: 400 #End Region Sub Process_Globals Private fx As JFX Private MainForm As Form Private btnmsg As Button End Sub Sub AppStart (Form1 As Form, Args() As String) MainForm = Form1 MainForm.SetFormStyle("UNIFIED") MainForm.RootPane.LoadLayout("Layout1") MainForm.Show Thanks in advance, microbox
derez Expert Licensed User Longtime User Jul 15, 2016 #2 You have to add the button to the form, like in this: Code: btnmsg.Initialize("btnmsg") MainForm.RootPane.AddNode(btnmsg,250,250,90,50) Upvote 0
You have to add the button to the form, like in this: Code: btnmsg.Initialize("btnmsg") MainForm.RootPane.AddNode(btnmsg,250,250,90,50)
DonManfred Expert Licensed User Longtime User Jul 16, 2016 #3 derez said: You have to add the button to the form, like in this Click to expand... But he is loading a Layout containing the button!? That´s how i interpret post #1 No need to add it manually then... microbox said: I created a form with a button Click to expand... microbox said: I also make sure that I'm calling the correct layout... Click to expand... Upvote 0
derez said: You have to add the button to the form, like in this Click to expand... But he is loading a Layout containing the button!? That´s how i interpret post #1 No need to add it manually then... microbox said: I created a form with a button Click to expand... microbox said: I also make sure that I'm calling the correct layout... Click to expand...
klaus Expert Licensed User Longtime User Jul 16, 2016 #5 I had the same problem. Commenting this line ' MainForm.SetFormStyle("UNIFIED") solved the problem. Upvote 0
microbox Active Member Licensed User Longtime User Jul 16, 2016 #6 Thanks derez and DonManfred for the time @klaus it works! Upvote 0