Hi,
I have a series of rectangles on a form as follows:
rec0801 rec0802 rec0804 rec0805 ....... rec0824
.
.
.
.
rec0201 rec0202 rec0203 rec0204 ....... rec0224
rec0101 rec0102 rec0103 rec0104 ....... rec0124
A bit like pixels.
I need to manipulate these rectangles every time a timer iterates.
The long and messy way of doing this, which I don't much like, is to set a count variable and increment is as following.
I'd rather do this with a repeat.... until loop a bit like the following. Excuse my syntax for this, I am trying to get over the type of thing I am trying to do:
What is the syntax for doing something like this? Is it possible? Do I have to create the rectangles differently?
Using Borland Delphi 4.
Thank you very much,
Froskoy.
I have a series of rectangles on a form as follows:
rec0801 rec0802 rec0804 rec0805 ....... rec0824
.
.
.
.
rec0201 rec0202 rec0203 rec0204 ....... rec0224
rec0101 rec0102 rec0103 rec0104 ....... rec0124
A bit like pixels.
I need to manipulate these rectangles every time a timer iterates.
The long and messy way of doing this, which I don't much like, is to set a count variable and increment is as following.
Code:
procedure tmrIterate.....;
begin
if Count=1 then rec0101.Brush.Color:=.....
if Count=2 then rec0102.Brush.Color:=.....
e.t.c.
Count:=Count+1;
end;
I'd rather do this with a repeat.... until loop a bit like the following. Excuse my syntax for this, I am trying to get over the type of thing I am trying to do:
Code:
procedure tmrIterate.....;
begin
repeat
rec[x][y].Brush.Color:=.....
Count:=Count+1;
until Count:=192;
end;
What is the syntax for doing something like this? Is it possible? Do I have to create the rectangles differently?
Using Borland Delphi 4.
Thank you very much,
Froskoy.