大家好!
刚学DELPHI,现有一问题想请教大家,希望大家教教小弟.
我用stringGrid画了个表格.现在想在表格里每点击一下鼠标左键就画一个按钮,请问我该如何实现?用什么控件呢?
刚学DELPHI,现有一问题想请教大家,希望大家教教小弟.
我用stringGrid画了个表格.现在想在表格里每点击一下鼠标左键就画一个按钮,请问我该如何实现?用什么控件呢?
解决方案 »
- 100 分 求高手帮我真正 解决这个问题(SQL SERVER 2000 存储过程),一个非常恶心的问题,非常非常感谢
- 一个有关 类 的问题!
- 一个极简单的问题,请大家指点
- ltysunde(天崖滴血) 100
- 类型转换的问题..急啊..在线等....
- 如何判断一个now是否是正点???
- 我该怎么办?
- 那里有delphi70的http方式的下载??我这里ftp被禁止了。
- 关于installshield中如何在安装程序时同时进行数据库的安装?有代码的最好:)高分悬赏
- 高手都到那里去了........................
- 问个关于pdf生成工具adobe output design的问题
- GetAsyncKeyState 一直困扰我的问题!
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, Grids;type
TForm1 = class(TForm)
StringGrid1: TStringGrid;
BitBtn1: TBitBtn;
procedure FormCreate(Sender: TObject);
procedure StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin
StringGrid1.DefaultRowHeight := BitBtn1.Height + 4;
StringGrid1.DefaultColWidth := BitBtn1.Width + 4;
end;procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
if ACol = 2 then
BitBtn1.PaintTo(StringGrid1.Canvas, Rect.Left + 2, Rect.Top + 2);end;end.
帮小弟个忙!不甚感激!我是用StringGrid画的表格.在左边设置了个按键,bitbtn,
我想让这个按键作为个开关.点下它,然后我在表格里每点一次鼠标左键就会出现个矩形框! 我该如何实现呢?大侠们帮帮小弟弟!