speedButton中有一个属性是boolean型
解决方案 »
- 在delphi中FastReport每一列的列宽等于CxGrid的列宽怎么做
- 求助:限制edit之类的文本框只能输入数字的方法?
- 一个简单得我都不好意思问,但是又很奇怪的小问题
- 问各位大佬一个TDCOMConnection的问题
- 这段代码什么意思呢?
- inner join语句是怎么用的,因为CSDN的历史帖子现在是不显示的(非常糟糕,很多问题都不能查询历史贴子了),所以只能提问了
- 如何在指定数字里随机取数?
- delphi 硬盘上的图片,存到oracle里的blob里
- 为什么quickreport中band设置frame(bottom,top)后表中的横线有粗有细,没有规律?
- 求助:delphi爱好者看一下,看看怎么解决最好!!拜托!拜托!
- 如何处理dbcombobox?
- 各位大侠,一个非常简单的问题??=======送分!
2、如果是,则检查鼠标是不是左钮按下的。这个可以用 GetKeyState还办到:传入参数VK_LBUTTON,看返回值的最高位是否为1。不过这个招不一定全都灵,推荐你试一试。
Left = 256
Top = 129
Width = 23
Height = 22
GroupIndex = 1
Down = True
end
begin
if TSpeedButton(Sender).Down then begin
TSpeedButton(Sender).AllowAllUp := True;
TSpeedButton(Sender).GroupIndex := 0;
TSpeedButton(Sender).Down := False;
end else begin
TSpeedButton(Sender).AllowAllUp := False;
TSpeedButton(Sender).GroupIndex := 1;
TSpeedButton(Sender).Down := True;
end;
end;procedure TForm1.FormCreate(Sender: TObject);
begin
SpeedButton1.AllowAllUp := False;
SpeedButton1.GroupIndex := 1;
SpeedButton1.Down := True;
end;
然后就可以通过Down这个属性判断它是否按下了