var edit:tedit;
i,tope:integer;
begin
tope:=0;
for i:=0 to m*n do
begin
edit:=tedit.Create(application);
edit.top:=tope;
edit.Parent:=form1;
tope:=tope+edit.Height+3;
end;
end;
i,tope:integer;
begin
tope:=0;
for i:=0 to m*n do
begin
edit:=tedit.Create(application);
edit.top:=tope;
edit.Parent:=form1;
tope:=tope+edit.Height+3;
end;
end;
解决方案 »
- 运行程序的时候配置文件出错
- dbchart中Bar显示问题
- 如何使用QuikReport中的QRCompositeReport来做一个复合报表?
- 现在很多公司在招delphi程序员的时候,喜欢加个"高级"二字,即"高级delphi程序员", 不知道做MIS的能不能有无希望成为"高级"?
- 生成一个自动化程序,然后在vb中调用,当关掉自动化程序时有一个很烦人的提示,怎么能不显示这个提示
- 请教高手:如何将TWebBrowser中浏览的网页连同图文件保存?象IE中的另存一样。
- 请问如何提取iis5配置文件MetaBase.bin中的有效数据。
- 好消息!!Borland将举行JBuilder7与Delphi6中文版新品发布会和新品特卖,欢迎进行会议注册,欲知详情,请访问www.borlandsoftware.com.c
- 那位大哥有DELPHI的API方面的资料,急用!
- DELPHI的正确读音是['delfai]还是['delfi]?
- 关于异常的问题!!
- 好奇怪......
var
I, J: Integer;
begin
Result := False;
if not Assigned(mParent) then Exit;
for I := 0 to M - 1 do
for J := 0 to N - 1 do
with TEdit.Create(mParent) do begin
Parent := mParent;
Left := Width * I;
Top := Height * J;
end;
Result := True;
end;procedure TForm1.Button1Click(Sender: TObject);
var
vForm: TForm;
begin
vForm := TForm.Create(nil);
try
vForm.AutoSize := True;
f(vForm, StrToIntDef(Edit1.Text, 0), StrToIntDef(Edit2.Text, 0));
vForm.ShowModal;
finally
vForm.Free;
end;
end;
var
I, J: Integer;
begin
Result := False;
if not Assigned(mParent) then Exit;
for I := 0 to M - 1 do
for J := 0 to N - 1 do
with TEdit.Create(mParent) do begin
Parent := mParent;
Left := Width * I;
Top := Height * J;
end;
Result := True;
end;procedure TForm1.Button1Click(Sender: TObject);
var
vForm: TForm;
begin
vForm := TForm.Create(nil);
try
vForm.AutoSize := True;
f(vForm, StrToIntDef(Edit1.Text, 0), StrToIntDef(Edit2.Text, 0));
vForm.ShowModal;
finally
vForm.Free;
end;
end;
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;type
TMyForm = class (TForm)
protected
FEdits:array of array of TEdit;
public
procedure EditExit(Sender: TObject);
constructor CreateWithEdits(Owner:TComponent;M,N:Integer);
end;
var
MyForm: TMyForm;implementation{$R *.DFM}constructor TMyForm.CreateWithEdits(Owner:TComponent;M,N:Integer);
const
EDITWIDTH = 100;
var
i,j:Integer;
begin
inherited Create(Owner);
0A SetLength(FEdits,M);
for i := 0 to m-1 do
begin
SetLength(FEdits[i],N);
for j := 0 to n-1 do
begin
FEdits[i,j] := TEdit.Create(self);
FEdits[i,j].Width := EDITWIDTH;
FEdits[i,j].Left := i * (EDITWIDTH + 10) + 10;
FEdits[i,j].Top := j * (FEdits[i,j].Height + 5) +5;
FEdits[i,j].OnExit := EditExit;
InsertControl(FEdits[i,j]);
end;
end;
end;procedure TMyForm.EditExit(Sender: TObject);
begin
with (Sender as TEdit) do
begin
//处理Edit的Exit事件.
end;
end;end.
____ ____
\ p \ / g /
\ l \_/ n /
\ a o /
\ i s /
\ n /
\_/