### Load another Layout

The sub below is an example on how to load another layout.
Ensure the layout files are added to the project files list.
`Sub LoadLayout(layout As String)
'Remove all nodes from the rootpane
MainForm.RootPane.RemoveAllNodes
'Load the layout
MainForm.RootPane.LoadLayout(layout)
End Sub`
Examples loading a layout using buttons
Three layouts are defined and added to the project. The b4j projectfile contains entries like below:
NumberOfFiles=3
File1=Layout1.bjl
File2=Layout2.bjl
File3=Layout3.bjl
`Sub Process_Globals
Private btnLoadLayout1 As Button
Private btnLoadLayout2 As Button
Private btnLoadLayout3 As Button
...
End Sub`
`Sub btnLoadLayout1_Action
LoadLayout("Layout1")
End Sub`
`Sub btnLoadLayout2_Action
LoadLayout("Layout2")
End Sub`
`Sub btnLoadLayout3_Action
LoadLayout("Layout3")
End Sub`

Changed: , Category: Application, File: T6C159M1170.htm, ID: 1170