procedure TForm1.Button1Click(Sender: TObject);
var
FFormEditor: TForm;
FHeaderPanel: TPanel;
FHederText: TLabel;
FDescriptionText: TLabel;
FFormFooter: TBevel;
FCenterPanel: TPanel;
FGroupBoxLazarus: TGroupBox;
FGroupBoxComponent: TGroupBox;
begin
FFormEditor := TForm.CreateNew(Application);
FFormEditor.Caption := 'Palette Editor';
FFormEditor.Height := 600;
FFormEditor.Width := 400;
FFormEditor.Position := poDesktopCenter;
FFormEditor.BorderStyle := bsSingle;
FFormEditor.BorderIcons := [biSystemMenu];
FCenterPanel := TPanel.Create(FFormEditor);
FCenterPanel.BevelInner := bvNone;
FCenterPanel.BevelOuter := bvNone;
FCenterPanel.Align := alClient;
FCenterPanel.ChildSizing.EnlargeHorizontal := crsScaleChilds;
FCenterPanel.ChildSizing.EnlargeVertical := crsScaleChilds;
FCenterPanel.Parent := FFormEditor;
FGroupBoxLazarus := TGroupBox.Create(FCenterPanel);
FGroupBoxLazarus.Align := alClient;
FGroupBoxLazarus.Caption := 'Lazarus Palette';
FGroupBoxLazarus.Parent := FCenterPanel;
FGroupBoxComponent := TGroupBox.Create(FCenterPanel);
FGroupBoxComponent.Align := alClient;
FGroupBoxComponent.Caption := 'Component Palette';
FGroupBoxComponent.Parent := FCenterPanel;
FFormFooter := TBevel.Create(FFormEditor);
FFormFooter.Shape := bsTopLine;
FFormFooter.Align := alBottom;
FFormFooter.Parent := FFormEditor;
FHeaderPanel := TPanel.Create(FFormEditor);
FHeaderPanel.BevelInner := bvNone;
FHeaderPanel.BevelOuter := bvNone;
FHeaderPanel.Align := alTop;
FHeaderPanel.Color := clWindow;
FHeaderPanel.Parent := FFormEditor;
FHederText := TLabel.Create(FHeaderPanel);
FHederText.Caption := FFormEditor.Caption;
FHederText.Font.Color := clBlack;
FHederText.Font.Style := [fsBold];
FHederText.Top := 8;
FHederText.Left := 8;
FHederText.Parent := FHeaderPanel;
FDescriptionText := TLabel.Create(FHeaderPanel);
FDescriptionText.Caption := 'Component palette configuration';
FDescriptionText.Top := FHederText.Height + 4;
FDescriptionText.Left := 16;
FDescriptionText.Parent := FHeaderPanel;
FFormEditor.Show;
FCenterPanel. ChildSizing.Layout := cclLeftToRightThenTopToBottom; -- this don't work
end;