unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, NxColumns, NxColumnClasses, NxInspector, NxScrollControl,
  NxCustomGridControl, NxCustomGrid, NxGrid, StdCtrls, NxSheet, NxSheetCell;

type
  TForm1 = class(TForm)
    NextSheet1: TNextSheet;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  NextSheet1.MergeCells(1, 1, 3, 2);
  NextSheet1.Cell[1, 1].BorderBottom.LineStyle := lsSolid;
  NextSheet1.Cell[1, 1].BorderBottom.Color := clRed;

  NextSheet1.Cell[1, 1].BorderLeft.LineStyle := lsThinDot;
  NextSheet1.Cell[1, 1].BorderLeft.Color := clBlue;

  NextSheet1.Cell[1, 1].BorderRight.LineStyle := lsDouble;
  NextSheet1.Cell[1, 1].BorderRight.Color := clGreen;

  NextSheet1.Cell[1, 1].BorderTop.LineStyle := lsThinLine;
  NextSheet1.Cell[1, 1].BorderTop.Color := clFuchsia;

  NextSheet1.Cell[2, 4].Color := clMoneyGreen;
end;

end.
