?? uviewf.pas
字號(hào):
unit uViewF;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ComCtrls, StdCtrls, ExtCtrls;
type
TViewF = class(TForm)
Button1: TButton;
Panel1: TPanel;
ListView1: TListView;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
constructor Create(ACaption : string; AListView : TListView;
AOwner:TComponent);
end;
var
ViewF: TViewF;
implementation
{$R *.DFM}
constructor TViewF.Create(ACaption: string; AListView: TListView;
AOwner: TComponent);
var
i , j : integer;
begin
inherited Create(AOwner);
self.Ctl3D := False;
Color := clBtnFace;
Caption := ACaption;
for i := 0 to AListView.Columns.Count -1 do
begin
with ListView1.Columns.Add do
begin
Width := AListView.Columns[i].Width;
Caption := AListView.Columns[i].Caption;
end;
end;
for i := 0 to AListView.Items.Count-1 do
begin
with ListView1.Items.Add do
begin
Caption := AListView.Items[i].Caption;
for j := 0 to AListView.Columns.Count -2 do
SubItems.Add(AListView.Items[i].SubItems.Strings[j]);
end;
end;
Show;
end;
procedure TViewF.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := caFree;
end;
procedure TViewF.Button1Click(Sender: TObject);
begin
Close;
end;
end.
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -