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;
循环你自己去写吧.
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;
循环你自己去写吧.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货