一form上有72个edit.有一数组aa:array of array of string;
先将edit的值属值给数组。
edit11,.......edit19
edit21........edit29
....................
edit81........edit89
我想可能如下:
var
i,j:integer;
begin
for i:=1 to 8 do
begin
for j:=1 to 9 do
begin
a[i,j]:= ; 这里应该怎么写?
end;
end;
end;请高手指点指点,谢啦
先将edit的值属值给数组。
edit11,.......edit19
edit21........edit29
....................
edit81........edit89
我想可能如下:
var
i,j:integer;
begin
for i:=1 to 8 do
begin
for j:=1 to 9 do
begin
a[i,j]:= ; 这里应该怎么写?
end;
end;
end;请高手指点指点,谢啦
解决方案 »
- dbcombobox1下拉选项有数据,但所选择的记录并不出现在dbcombobox1里。
- wizardqi(男巫) 請來接分
- 用word创建了一个模板文件,里面定义了一些变量,如何在delphi中打开这个模板文件,并替换里面对应的变量呀?急!!
- 第一天到成都,又要找工作了,散分。
- 高高手进来!前所未有的问题
- 为什么程序执行时,没有编译到这段代码呢?急死我了,来帮帮我吧!谢谢你们了!
- 菜单的问题
- 关于学delphi的困惑,各位前辈进来看看!
- 终于找回了csdn密码,送分以示庆贺
- sql explorer的查询结果怎样保存?
- 如何使用ADOQUERY实现日期字段的查询?????急
- 请问如何调用系统的 音频视频调节向导? (
可以吗
begin
if pan_panel.Components[i].Name='Myname' then
begin
....
end;
....
end;
access violation at address 0285bd24 in module 'report.ocx' read of address 00000010.
i,j:integer;
k : integer;
begin
for i:=0 to 7 do
begin
for j:=0 to 8 do
begin
a[i,j] := (Form1.Controls[i * 8 + j] as TEdit).属性;
end;
end;
end;
var
com:TComponent; com:=Form1.FindComponent('Edit'+IntToStr(i)+IntToStr(j));
if com<>nil then
a[i,j]:=a[i,j]:=TEdit(com).Text;
access violation at address 0285bd24 in module 'report.ocx' read of address 00000010.
i,j,k:integer;
a:array of array of string;
MyEdit:Tcomponent;
begin
setlength(a,8,9);
with groupbox1 do
for k:= 0 to componentcount-1 do
begin
for i:=1 to 8 do
for j:=1 to 9 do
begin
myedit:=findcomponent('edit'+inttostr(i)+inttostr(j));
if (myedit is TEdit) then
a[i,j]:=TEdit(myedit).text;
end;
end;
i,j,k:integer;
a:array of array of string;
MyEdit:Tcomponent;
begin
setlength(a,8,9);
// with groupbox1 do //去掉这句
for k:= 0 to componentcount-1 do
begin
for i:=1 to 8 do
for j:=1 to 9 do
begin
myedit:=findcomponent('edit'+inttostr(i)+inttostr(j));
if (myedit is TEdit) then
a[i,j]:=TEdit(myedit).text;
end;
end;
var I:Integer;
begin
for I:=1 to 4 do
begin
(form1.FindComponent('edit'+IntToStr(I+4)) as Tedit).Text:=(form1.FindComponent('edit'+IntToStr(I)) as TEdit).Text;
end;
end;
----------------------------------------------
上面是我做的一个测试,可行的,根据他改改就可以了
i,j:integer;
yy:array of array of string;
begin
setlength(yy,8,7);
begin
for i:=1 to 8 do
for j:=1 to 7 do
begin
yy[i,j]:=TEdit(reportform.FindComponent('edit'+IntToStr(i)+IntToStr(j))).Text;
end;
end;
end;