unit help;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, ComCtrls, StdCtrls, ExtCtrls, Credits;
type
TForm4 =
class(TForm)
TreeView1: TTreeView;
SpeedButton1: TSpeedButton;
Panel1: TPanel;
SpeedButton3: TSpeedButton;
SpeedButton2: TSpeedButton;
RichEdit1: TRichEdit;
procedure Button1Click(Sender: TObject);
procedure TreeView1Change(Sender: TObject; Node: TTreeNode);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form4: TForm4;
implementation
{$R *.dfm}
procedure TForm4.Button1Click(Sender: TObject);
begin
close;
end;
procedure TForm4.TreeView1Change(Sender: TObject; Node: TTreeNode);
begin
if not Assigned(Node)
then
exit;
if Node.Caption = '
TEXT1'
then
begin
RichEdit1.Lines.LoadFromFile('
TEXT1.txt');
end
else if Node.Caption = '
TEXT2'
then
begin
RichEdit1.Lines.LoadFromFile('
TEXT2.txt');
end;
end;
end;
end.