[HELP] Assign object properties with looping
Is it possible to assign object values using looping..???
I use this to made dynamic size of memo to fix with paper width using pascal script, not using design..
example : 5 memo, sometimes maybe 6-10..
___________________________________________________________________________
var
memo1,memo2,memo3, .....memo10 : TfrxMemoView;
i,count : integer;
memowidth, memoleft : Extended;
begin
end.
______________________________________________________________________________________________
Thanks
Sorry my bad english
I use this to made dynamic size of memo to fix with paper width using pascal script, not using design..
example : 5 memo, sometimes maybe 6-10..
___________________________________________________________________________
var
memo1,memo2,memo3, .....memo10 : TfrxMemoView;
i,count : integer;
memowidth, memoleft : Extended;
begin
memoleft:=0;
count:=5; //I'll use example 5 memo only to fix with page width
memowidth:=page1.paperwidth/5;
memo1:= TfrxMemoView.Create(MasterData1);
memo2:= TfrxMemoView.Create(MasterData1);
memo3:= TfrxMemoView.Create(MasterData1);
....memo10
for i:=1 to count
beginend;//this I had the problem with, how I assign memo 1 to 5 (count) properties value using loop?
memoi.setbounds(memoleft,0,memowidth,0);
memoleft:=memoleft+memowidth;
end.
______________________________________________________________________________________________
Thanks
Sorry my bad english
Comments
(if you need for more than 1 band, you will have to change your code accordingly)
Alternatively, you could do a function to return the object you want like: