git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.DevExpressVCL@24 05c56307-c608-d34a-929d-697000501d7a
50 lines
1.1 KiB
ObjectPascal
50 lines
1.1 KiB
ObjectPascal
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.
|