I'm having problems with the dimensions of form elements when scaling a window. When I just start the program, the dimensions are wrong, when I scale the window, the resize event is triggered and everything becomes correct, but I call the same event(MainForm_Resize) when the program starts(AppStart).
Also, when I open the window in full screen mode, all the elements are positioned completely wrong.
Also, when I open the window in full screen mode, all the elements are positioned completely wrong.
B4X:
Private Sub MainForm_Resize (Width As Double, Height As Double)
MenuBar1.Top=0
MenuBar1.Left=0
CodeArea1.EditTop(MenuBar1.Height)
CodeArea1.EditLeft(0)
CodeArea1.SetEditSize(Width*0.8, Height*0.6)
TreeView1.Top = MenuBar1.Height
TreeView1.Left=CodeArea1.GetWidth
TreeView1.SetSize(Width-CodeArea1.GetWidth,Height-MenuBar1.Height)
TextArea1.Top=CodeArea1.GetHeight+MenuBar1.Height
TextArea1.Left=0
TextArea1.SetSize(Width-TreeView1.Width,Height - CodeArea1.GetHeight - MenuBar1.Height)
End Sub