unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, NxControls6, NxCollection6, NxNotebook6,
  NxPageControl6, Vcl.StdCtrls, Vcl.ImgList, NxTypes6, NxConsts6, NxEdit6;

type
  TForm1 = class(TForm)
    NxPageControl61: TNxPageControl6;
    Button1: TButton;
    GroupBox1: TGroupBox;
    RadioButton1: TRadioButton;
    RadioButton2: TRadioButton;
    RadioButton3: TRadioButton;
    RadioButton4: TRadioButton;
    NxPageSheet61: TNxPageSheet6;
    GroupBox2: TGroupBox;
    RadioButton5: TRadioButton;
    RadioButton6: TRadioButton;
    ImageList1: TImageList;
    NxColorScheme61: TNxColorScheme6;
    CheckBox1: TCheckBox;
    NxFlipPanel61: TNxFlipPanel6;
    NxSpinEdit61: TNxSpinEdit6;
    Label1: TLabel;
    NxLinkLabel61: TNxLinkLabel6;
    GroupBox3: TGroupBox;
    RadioButton7: TRadioButton;
    RadioButton8: TRadioButton;
    CheckBox2: TCheckBox;
    RadioButton9: TRadioButton;
    procedure Button1Click(Sender: TObject);
    procedure RadioButton2Click(Sender: TObject);
    procedure RadioButton1Click(Sender: TObject);
    procedure RadioButton3Click(Sender: TObject);
    procedure RadioButton4Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure RadioButton5Click(Sender: TObject);
    procedure RadioButton6Click(Sender: TObject);
    procedure CheckBox1Click(Sender: TObject);
    procedure NxSpinEdit61Change(Sender: TObject);
    procedure NxPageControl61TabClick(Sender: TObject; Page: TNxPageSheet6;
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
    procedure NxPageControl61PageCloseQuery(Sender: TObject;
      Page: TNxPageSheet6; var CanClose: Boolean);
    procedure RadioButton7Click(Sender: TObject);
    procedure RadioButton8Click(Sender: TObject);
    procedure CheckBox2Click(Sender: TObject);
    procedure RadioButton9Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  with NxPageControl61.AddPage(True) do
  begin
    Caption := 'Long Caption Tab';
    TabColor := $004080FF;
    ImageIndex := 1;
  end;
  with NxPageControl61.AddPage(True) do
  begin
    Caption := 'Test';
    TabColor := clOlive;
    ImageIndex := 2;
  end;
  with NxPageControl61.AddPage(True) do
  begin
    Caption := 'Example';
    TabColor := $00FF8080;
    ImageIndex := 3;
  end;
end;

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
  NxPageControl61.ShowImages := TCheckBox(Sender).Checked;
end;

procedure TForm1.CheckBox2Click(Sender: TObject);
begin
  NxPageControl61.StyleColors := TCheckBox(Sender).Checked;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  NxPageControl61.DoubleBuffered := True;
  NxPageControl61.TabsPadding.Top := 8;
  NxPageControl61.TabsPadding.Left := 16;
  NxPageControl61.TabsPadding.Right := 8;
  NxPageControl61.TabsPadding.Bottom := 0;
  NxPageControl61.TabPadding.Left := 8;
  NxPageControl61.TabPadding.Right := 8;
end;

procedure TForm1.NxPageControl61PageCloseQuery(Sender: TObject;
  Page: TNxPageSheet6; var CanClose: Boolean);
begin
  if MessageDlg('Are you sure?', mtConfirmation, [mbYes, mbNo], 0) = mrNo then
    CanClose := False;
end;

procedure TForm1.NxPageControl61TabClick(Sender: TObject; Page: TNxPageSheet6;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  Caption := 'Click on tab: ' + Page.Caption;
end;

procedure TForm1.NxSpinEdit61Change(Sender: TObject);
begin
  NxPageControl61.TabsSpacing := NxSpinEdit61.AsInteger;
end;

procedure TForm1.RadioButton1Click(Sender: TObject);
begin
  NxPageControl61.TabsLocation := tbTop;
end;

procedure TForm1.RadioButton2Click(Sender: TObject);
begin
  NxPageControl61.TabsLocation := tbBottom;
end;

procedure TForm1.RadioButton3Click(Sender: TObject);
begin
  NxPageControl61.TabsLocation := tbLeft;
end;

procedure TForm1.RadioButton4Click(Sender: TObject);
begin
  NxPageControl61.TabsLocation := tbRight;
end;

procedure TForm1.RadioButton5Click(Sender: TObject);
begin
  NxPageControl61.CloseButtonLocation := cbBeside;
end;

procedure TForm1.RadioButton6Click(Sender: TObject);
begin
  NxPageControl61.CloseButtonLocation := cbTab;
end;

procedure TForm1.RadioButton7Click(Sender: TObject);
begin
  NxPageControl61.Style := stNative;
  NxPageControl61.ActiveTabColor := clSilver;
end;

procedure TForm1.RadioButton8Click(Sender: TObject);
begin
  NxPageControl61.Style := stModern;
end;

procedure TForm1.RadioButton9Click(Sender: TObject);
begin
  NxPageControl61.Style := stUserDefined;
end;

end.
