unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Grids, ValEdit;

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

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  Valuelisteditor1.TitleCaptions.Clear;
  Valuelisteditor1.TitleCaptions.Add('LP');
  Valuelisteditor1.TitleCaptions.Add('Wartość');
  Valuelisteditor1.Repaint;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  Valuelisteditor1.InsertRow('1','aaa',true);
  Valuelisteditor1.InsertRow('2','bbb',true);
  Valuelisteditor1.InsertRow('3','ccc',true);
  //Valuelisteditor1.Strings.Add('ccc');

  Repaint;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  if ValueListEditor1.RowCount>2 then Valuelisteditor1.DeleteRow(2);
end;

end.
