200分求购一个Tstringgrid控件(200分)

  • 主题发起人 mycwcgr_new
  • 开始时间
M

mycwcgr_new

Unregistered / Unconfirmed
GUEST, unregistred user!
要求:
1、有源程序
2、能够显示ICON或BMP图像
3、能方便的插入或删除一行
 
TopGrid 2.01 www.ocloud.com上有
 
TopGrid 2.01不是免费的
其它增强的Tstringgrid控件是不是有
 
TMSPACK里有一个STRINGGRID,还不错。
可以找到它的破解。
 
用advgrid吧,http://www.tmssoftware.com/
 
qutuaumgrid应该可以吧
 
用DrawGrid就可以了。
 
1: advgrid is not free
2: Where find qutuaumgrid
 
www.51delphi.com
 
这段程序可回答您一半的问题,可不可以给一半的分?

(1)使用TStringGrid的OnDrawCell事件
(2)代码:
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;Rect: TRect; State: TGridDrawState);
var
index: integer;
begin
//确定从ImageList中的图像索引号
index := ARow * (Sender as TStringGrid).ColCount + ACol;

with Sender as TStringGrid do
begin
//填充背景
Canvas.Brush.Color := clBackGround;
Canvas.FillRect(Rect);

//把imageList的图像显示在StringGrid中
ImageList1.Draw(Canvas,Rect.Left,Rect.Top,index);

if gdFocused in State then
Canvas.DrawFocusRect(Rect);
end;
 
多人接受答案了。
 

Similar threads

顶部