feditentry.pas

来自「Delphi编写的一个支持语法高亮显示和很多语言的文本编辑器」· PAS 代码 · 共 59 行

PAS
59
字号
unit fEditEntry;

interface

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

type
  TfrmEditEntry = class(TForm)
    Label1: TLabel;
    edtSource: TEdit;
    btnAddSource: TButton;
    Label2: TLabel;
    cmbDir: TComboBox;
    GroupBox1: TGroupBox;
    rb1: TRadioButton;
    rb2: TRadioButton;
    rb3: TRadioButton;
    rb4: TRadioButton;
    btnOK: TButton;
    Button1: TButton;
    dlgOpen: TOpenDialog;
    procedure btnAddSourceClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmEditEntry: TfrmEditEntry;

implementation

uses fNSIS, ComCtrls;

{$R *.dfm}

procedure TfrmEditEntry.btnAddSourceClick(Sender: TObject);
var
  i: INteger;
  strStore: String;
begin
  With dlgOpen do begin
    Filter := 'All Files (*.*)|*.*';
    if Execute then begin
      strStore := '';
      for i := 0 to Files.Count - 1 do begin
        if strStore <> '' then strStore := strStore + ',';
        strStore := strStore + Files[i];
      end;
      edtSource.Text := strStore;
    end;
  end;
end;

end.

⌨️ 快捷键说明

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