I 'm a novice user of Gambas3 (version 3.19.5 on Linux Mint 21.3 and 22.0 -different computers- / installed Gambas3 the right way on both ), and I 'd like to ask how can I embed a form in a Panel. (Form / Panel same dimensions, designated as neither expandable, nor shrinkable.)
I coded thus (with Form1 already designed) :
Public Sub FMain()
Application.MainWindow = Window
Panel1.Enabled = True
FMain.Children = Panel1
Form1.Parent = FMain.Panel1
Form1.Move(0, 0)
End
Public Sub Menu1_Click()
Form1.Show()
End
...but my Form1 seems hovering over the panel (and at different starting coordinates) and not inside it. Also, when I insert the "Form1.Parent = FMain.Panel1" directive in the Public Sub Menu1_Click() subroutine, the program execution stops with a "read-only" error on Form1.Parent.
Please note that I started the project as a graphical application, and checked the Project / Properties / Components as displayed on the attachment.
So:
- What did I do wrong?
- And why do I need a double press on the Menu1 area, to get a result (even erroneous)?
Thank you!