unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, NxAssociates6,
  NxControls6, NxLayout6, NxLayoutNodes6;

type
  TForm1 = class(TForm)
    NextLayout61: TNextLayout6;
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  NextLayout61.Associates.Add(Button1);

  with NextLayout61.Nodes.Add(TNxLabelLayoutNode6) do
  begin
    TextBefore := 'Root Node';
    Padding.SetBounds(16, 4, 4, 4);

    with ChildNodes.Add(TNxStringLayoutNode6) do
    begin
      TextBefore := 'Category';
      IconIndexBefore := 1;

      Padding.SetBounds(32, 4, 4, 4);

      with ChildNodes.Add(TNxEditLayoutNode6) do
      begin
        TextBefore := 'Sample:';
        BindProperty := 'Caption';
        Width := 160;
      end;

    end;
  end;

  //NextLayout61.ReadProperties;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  NextLayout61.Nodes[0].ChildNodes[0].ChildNodes[0].TextAfter := 'px';
  NextLayout61.Nodes[0].ChildNodes[0].ChildNodes[0].AsString := 'Test';
end;

end.
