unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls;
type
TForm1 =
class(TForm)
Edit1: TEdit;
TreeView1: TTreeView;
procedure Edit1Exit(Sender: TObject);
procedure TreeView1Change(Sender: TObject; Node: TTreeNode);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Edit1Exit(Sender: TObject);
begin
Showmessage('
Exit');
end;
procedure TForm1.TreeView1Change(Sender: TObject; Node: TTreeNode);
begin
Showmessage('
Change');
end;
procedure TForm1.FormCreate(Sender: TObject);
var NewNode, oldNode:TTreeNode;
begin
NewNode := TTreeNode.Create(Treeview1.items);
NewNode := TreeView1.Items.Add(NewNode,'
Ast1' );
OldNode := NewNode ;
NewNode := TTreeNode.Create(Treeview1.items);
TreeView1.Items.AddChild(OldNode,'
Abteilung1');
TreeView1.Items.AddChild(oldNode,'
Abteilung2');
TreeView1.Items.AddChild(oldNode,'
Abteilung3');
TreeView1.Items.Add(TTreeNode.Create(Treeview1.items),'
Ast2' );
TreeView1.Items.Add(TTreeNode.Create(Treeview1.items),'
Ast3' );
end;
end.