TreeForm.pas
资源名称:delphi.rar [点击查看]
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:4k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit TreeForm;
- interface
- uses
- SysUtils, Windows, Messages, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, ComCtrls, Menus;
- type
- TForm1 = class(TForm)
- TreeView1: TTreeView;
- MainMenu1: TMainMenu;
- Options1: TMenuItem;
- File1: TMenuItem;
- Exit1: TMenuItem;
- Help1: TMenuItem;
- About1: TMenuItem;
- Root1: TMenuItem;
- Buttons1: TMenuItem;
- Lines1: TMenuItem;
- N1: TMenuItem;
- Font1: TMenuItem;
- FontDialog1: TFontDialog;
- procedure FormCreate(Sender: TObject);
- procedure About1Click(Sender: TObject);
- procedure Root1Click(Sender: TObject);
- procedure Buttons1Click(Sender: TObject);
- procedure Lines1Click(Sender: TObject);
- procedure Exit1Click(Sender: TObject);
- procedure Font1Click(Sender: TObject);
- procedure TreeView1DragOver(Sender, Source: TObject; X, Y: Integer;
- State: TDragState; var Accept: Boolean);
- procedure TreeView1DragDrop(Sender, Source: TObject; X, Y: Integer);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure TreeView1MouseDown(Sender: TObject; Button: TMouseButton;
- Shift: TShiftState; X, Y: Integer);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.DFM}
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- TreeView1.LoadFromFile (
- ExtractFilePath (Application.ExeName) + 'TreeText.txt');
- end;
- procedure TForm1.About1Click(Sender: TObject);
- begin
- MessageDlg ('DragTree Example'#13'by Marco Cant