Eklemim ama işe yaramadı.
Kod: Tümünü seç
if Not(Key in ['0' .. '9', #8]) then
begin
Key := #0;
end;
Kod: Tümünü seç
procedure TForm1.MultipleKopyaClick(Sender: TObject);
var
AMsgDialog: TForm;
AEdit: TEdit;
Key: Char;
begin
try
with ListView1 do
begin
if Items.Count > 0 then
begin
AMsgDialog := CreateMessageDialog('XXXXXXXX!', mtCustom, [mbYes]);
TButton(AMsgDialog.FindComponent('Yes')).Caption := 'Kaydet';
TButton(AMsgDialog.FindComponent('Yes')).Height := 25;
TButton(AMsgDialog.FindComponent('Yes')).Width := 65;
TButton(AMsgDialog.FindComponent('Yes')).Top := 43;
TButton(AMsgDialog.FindComponent('Yes')).Left := 84;
TButton(AMsgDialog.FindComponent('Yes')).Cursor := crHandPoint;
AEdit := TEdit.Create(AMsgDialog);
with AMsgDialog do
begin
Caption := 'XXXXXXXXXXXXXXXX';
Height := 125;
Width := 168;
With AEdit do
begin
Parent := AMsgDialog;
AutoSize := False;
MaxLength := 2;
Font.Size := 10;
Top := 45;
Left := 12;
Height := 23;
Width := 60;
if Not(Key in ['0' .. '9', #8]) then
begin
Key := #0;
end;
if ShowModal = ID_YES then
begin
end;
end;
end;
end;
end;
except
end;
end;