strlistfrm.pas

来自「FlexGraphics是一套创建矢量图形的VCL组件」· PAS 代码 · 共 48 行

PAS
48
字号
unit StrListFrm;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Buttons, FlexProps;

type
  TStrListPropForm = class(TForm)
    mmText: TMemo;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    procedure FormShow(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
    FStrListProp: TStrListProp;
  public
    { Public declarations }
  end;

var
  StrListPropForm: TStrListPropForm;

implementation

{$R *.DFM}

procedure TStrListPropForm.FormShow(Sender: TObject);
begin
 if (Tag <> 0) and (TObject(Tag) is TStrListProp) then
  FStrListProp := TStrListProp(Tag);
 if Assigned(FStrListProp) then
  mmText.Text := FStrListProp.Text;
end;

procedure TStrListPropForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
 if (ModalResult <> mrOk) or not Assigned(FStrListProp) then exit;
 FStrListProp.Text := mmText.Text;
end;

initialization
  RegisterDefaultPropEditForm(TStrListProp, TStrListPropForm);

end.

⌨️ 快捷键说明

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