SpeedButton 能不能点上去换图片啊?(在线等待) 哪为来帮帮忙,我想让SpeedButton的图片换一下,就是写在MouseDown事件里的。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 if SpeedButton1.Down then SpeedButton1.Glyph.LoadFromFile('YourBMPFile.bmp')else ...不过比较浪费资源。 procedure TF_test.SpeedButton1Mousedown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);begin speedbutton1.Glyph.LoadFromFile('f:\图片\2.bmp');end; 谢谢二位,我还想问一下,speedbutton为什么没有leave事件啊?那我的鼠标移开的时候不是就变不回去了吗?? 你在mouseup中再还原回原来地图片就可以了。 speedbutton没有MouseLeave和MouseEnter事件,但它是从GraphicsControl中继承来的,可重新继承创建有这两个事件的按钮。 你是要想鼠标移开的时候变回原来的图片吗??这样可以呀你可以在窗体的Mousemove事件中再添加代码speedbutton1.Glyph.LoadFromFile(‘你的原来图片.bmp'); 请教各位高手,急!!! 能不能推荐一个人气比较旺的delphi群(初级也可),加了几个很不理想,像一群死人一样,一句话都不讲. Excel问题 100分,急求 请问如何在quickreport里实现 本页合计的功能、、、高手请进!!急!高分相赠!!! 新建群:Delphi+DB 843353 欢迎加入! ZipTV Component Suite for delphi 怎么注册啊? Interbase的连接问题? 请介绍控件 Delphi的版本问题 关于多态问题 求助:怪了,这是怎么回事呢? 用delphi写这样一个软件要多少人力和成本?
SpeedButton1.Glyph.LoadFromFile('YourBMPFile.bmp')
else
...不过比较浪费资源。
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
speedbutton1.Glyph.LoadFromFile('f:\图片\2.bmp');
end;
这样可以呀
你可以在窗体的Mousemove事件中再添加代码
speedbutton1.Glyph.LoadFromFile(‘你的原来图片.bmp');