Library Vcl NextSuite 6 NextLayout6 Articles Start with NextLayout6 Run time tutorial

Run time tutorial

Adding nodes

Adding new nodes in run-time can be done easily with Add method.

pas
NextLayout61.Nodes.Add(TNxLabelLayoutNode6);

Optionally, text can be specified as second parameter:

pas
NextLayout61.Nodes.Add(TNxLabelLayoutNode6, 'Settings');

To add a different node type, for example Toolbar Node write:

pas
NextLayout61.Nodes.Add(TNxToolbarLayoutNode6, 'Font Style');

Binding properties

One or several object can be bind to NextLayout6 component and nodes that have set BindProperty.

First, an object need to be added to the list of associated object. This can be done via Associates property.

Example:

pas
NextLayout61.Associates.Add(Edit1);

After that BindProperty need to be set on nodes that need be bind.

pas
FontSizeNode.BindProperty := 'Font.Size';

Editing nodes

A node can be accessed via Nodes and ChildNodes array.

pas
NameNode := NextLayout61.Nodes[1].ChildNodes[2];
NameNode.TextBefore := 'Name';

Sign in