⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uviewf.pas

📁 图书馆管理系统代码deiphi
💻 PAS
字号:
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.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -