newdial.pas

来自「Mastering Delphi 7 随书源代码 07 适合初学者」· PAS 代码 · 共 49 行

PAS
49
字号
unit NewDial;

interface

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

type
  TFormItem = class(TForm)
    EditReference: TEdit;
    EditAuthor: TEdit;
    EditCountry: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    ComboType: TComboBoxEx;
  private
    { Private declarations }
  public
    procedure Clear;
  end;

var
  FormItem: TFormItem;

implementation

uses RefForm;

{$R *.DFM}

{ TFormItem }

procedure TFormItem.Clear;
var
  I: Integer;
begin
  // clear each edit box
  for I := 0 to ControlCount - 1 do
    if Controls [I] is TEdit then
      TEdit (Controls[I]).Text := '';
end;

end.

⌨️ 快捷键说明

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