unboundmodedemocustomfield.pas
来自「胜天进销存源码,国产优秀的进销存」· PAS 代码 · 共 50 行
PAS
50 行
unit UnboundModeDemoCustomField;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, cxButtons, cxLookAndFeelPainters;
type
TUnboundModeDemoCustomFieldForm = class(TForm)
lbHeight: TLabel;
lbWidth: TLabel;
lbMineCount: TLabel;
edtHeight: TEdit;
edtWidth: TEdit;
edtMineCount: TEdit;
btnOK: TcxButton;
bntCancel: TcxButton;
procedure edtKeyPress(Sender: TObject; var Key: Char);
procedure bntCancelClick(Sender: TObject);
public
function ShowModal: Integer; override;
end;
implementation
uses UnboundModeDemoTypes;
{$R *.DFM}
function TUnboundModeDemoCustomFieldForm.ShowModal: Integer;
begin
SetFormPosition(Self, 25, 25);
Result := inherited ShowModal;
end;
procedure TUnboundModeDemoCustomFieldForm.edtKeyPress(Sender: TObject;
var Key: Char);
begin
if (Key < '0') or ('9' < Key) then
Key := Char(7);
end;
procedure TUnboundModeDemoCustomFieldForm.bntCancelClick(Sender: TObject);
begin
Close;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?