2011-02-11
展开全部
学会看Help
procedure TForm1.DrawGrid1DrawCell(Sender: TObject; Col, Row: Longint; Rect: TRect; State: TGridDrawState);
var
index: integer;
begin
index := Row * DrawGrid1.ColCount + Col;
with Sender as TDrawGrid do
begin
Canvas.Brush.Color := clBackGround;
Canvas.FillRect(Rect);
ImageList1.Draw(Canvas,Rect.Left,Rect.Top,index);
if gdFocused in State then
Canvas.DrawFocusRect(Rect);
end;
end;
procedure TForm1.DrawGrid1DrawCell(Sender: TObject; Col, Row: Longint; Rect: TRect; State: TGridDrawState);
var
index: integer;
begin
index := Row * DrawGrid1.ColCount + Col;
with Sender as TDrawGrid do
begin
Canvas.Brush.Color := clBackGround;
Canvas.FillRect(Rect);
ImageList1.Draw(Canvas,Rect.Left,Rect.Top,index);
if gdFocused in State then
Canvas.DrawFocusRect(Rect);
end;
end;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询