Wow KodeZwerg. That's so cool.
(Just got back from an outdoors park gym workout at 10.30 pm).
I was looking at your magnificent code:
LTag := (Sender as TShape).Tag; means the tag number is the shape clicked tag. (that's one thing I did not how to write in the code. It makes sense now.
if (LTag > (FBlockRow * FBlockCol)) means the click is not i the initial row by column block
LTag := LTag mod (FBlockRow * FBlockCol); means tag number is the left over from mod division
The part I am still trying to understand is:
[color=red][b] if ((i = LTag) or (i - (FBlockRow * FBlockCol) = LTag)) [/b][/color]then
FBlocks[Brows, Bcols, Srows, Scols].Brush.Color := btnColor.ButtonColor;
Inc(i);
if (i > (FBlockRow * FBlockCol)) then
i := 1;
Would
i be the block number, like the second 5x5 block, 3rd 5x5 block number and so on.
Still can't get over how you coded all of that so efficiently. I was struggling with the logic and how to write it into TfrmMain.ShapeEvent procedure code.
I am so impressed.
Thanks for helping out once again KodeZwerg.