B4J Question Open another form

Spinter

Active Member
Licensed User
Longtime User
B4X:
Sub Process_Globals
    Private fx As JFX
    Private MainForm As Form
    Dim Text1 As TextArea
    Dim Button1 As Button
    Private frm As Form
End Sub
 
Sub AppStart (Form1 As Form, Args() As String)
    MainForm = Form1
    MainForm.RootPane.LoadLayout("1") 'Load the layout file.
    MainForm.Show
End Sub
 
Sub Button1_Action
    frm.Initialize("frm", 300dip, 200dip)
    frm.Title = "Choose color"
    frm.SetFormStyle("DECORATED")
    frm.RootPane.LoadLayout("2")
    frm.Show 
End Sub
 
Sub frm_CloseRequest (EventData As Event)
    frm.Close
End Sub
 
Upvote 0
Top