stringgridmain.pas

来自「GREATIS Print Suite Pro for Delphi (3-7,」· PAS 代码 · 共 64 行

PAS
64
字号
(*          GREATIS PRINT SUITE                 *)
(*  Copyright (C) 2001-2007 Greatis Software    *)
(*      web: http://www.greatis.com             *)
(*  support: http://www.greatis.com/bteam.html  *)

unit StringGridMain;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  PSJob, PSStatusBar, PSPreview, ExtCtrls, PSToolbar, PJStringGrid, 
  PJTextGrid, Grids;

type
  TMainForm = class(TForm)
    PreviewToolbar: TPreviewToolbar;
    Preview: TPreview;
    PreviewStatusBar: TPreviewStatusBar;
    StringGrid: TStringGrid;
    StringGridPrintJob: TStringGridPrintJob;
    procedure FormCreate(Sender: TObject);
    procedure StringGridColumnMoved(Sender: TObject; FromIndex,
      ToIndex: Integer);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  MainForm: TMainForm;

implementation

{$R *.DFM}

procedure TMainForm.FormCreate(Sender: TObject);
begin
  with StringGrid do
  begin
    Cols[0].Text:=
      'Product'#13#10+
      'Print Suite'#13#10+
      'TFormDesigner'#13#10+
      'WinDowse'#13#10+
      'TCoolorDialog';
    Cols[1].Text:=
      'Description'#13#10+
      'Components for print with preview'#13#10+
      'Run-time form designer'#13#10+
      'Advanced Windows analyser'#13#10+
      'Advanced color dialog component';
  end;
end;

procedure TMainForm.StringGridColumnMoved(Sender: TObject; FromIndex,
  ToIndex: Integer);
begin
  StringGridPrintJob.Update;
end;

end.

⌨️ 快捷键说明

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