|[Top] [Chapter] [Previous] [Next]|
The method SetLayout() is used to load the description file for the user interface.
The editor needs the PCC file to display a toolbar. This description file is created by the "Packagefile Editor".
SetLayout() expects 5 parameters:
1. string LayoutFile - the path to the layout file, i.e. "Buttons.PCC"
2. string LayoutName - the name of the layout entry in the package file, i.e. "default"
3. string LayoutPW - the password used for the PCC file or an empty string
4. string LayoutMainXML - the XML branch for the main editor, i.e. "main"
5. string LayoutSecondXML - the XML branch for the second editor (can be the same as LayoutMainXML)
The .NET assembly also implements the SetLayout method with only two parameters, LayoutFile and LayoutPW. The other parameters will use the values "default", "main", "main".
For a package file which uses this names ...
... the call to SetLayout has to look like this:
C#: SetLayout("..\\buttons.pcc", "default", "", "main", "main");
Private Sub Form_Load()
' The PCC file will be searched in the same path as the DLL !
WPDLLInt1.SetLayout "..\buttons.pcc", "Default", "", "main", "main"
Note: SetLayout is not required if you do not use the toolbar or any of the tool panels. In this case no PCC file needs to be loaded.
If you specify a relative path, the directory which contains the engine DLL will be used as basis.