Moving rectangle around StringGrid
From: Ray Hall (rayhall_at_bigpond.net.au)
Date: 03/28/05
- Next message: John Smith: "How to add linebreak to a long string"
- Previous message: Evil miniFAQ Boss: "FAQ: comp.lang.pascal.delphi.misc miniFAQ (full version)"
- Next in thread: Ray Hall: "Re: Moving rectangle around StringGrid"
- Reply: Ray Hall: "Re: Moving rectangle around StringGrid"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 27 Mar 2005 23:56:25 GMT
Hello,
I am trying to move a rectangle around on a StringGrid. I can draw the
rectangle using FrameRect, but I end up with many rectangles as I move it.
This is some of the code I am using and a link to a video of what I want to
achive.
http://www.turbofast.com.au/bin/GhostBox.avi (240k)
with StringGrid1 do
begin
Cells[xCel, yCel]:= FloatToStr(air);
Update;
TheRect := Rect(L + x,T + y,R + x,B + y);
Canvas.Brush.Color := clRed;
Canvas.FrameRect(TheRect);
end;
Thanks,
Ray Hall.
- Next message: John Smith: "How to add linebreak to a long string"
- Previous message: Evil miniFAQ Boss: "FAQ: comp.lang.pascal.delphi.misc miniFAQ (full version)"
- Next in thread: Ray Hall: "Re: Moving rectangle around StringGrid"
- Reply: Ray Hall: "Re: Moving rectangle around StringGrid"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|