当鼠标移动到按钮时,改变按钮颜色?(20分)

  • 主题发起人 Gingerzy
  • 开始时间
G

Gingerzy

Unregistered / Unconfirmed
GUEST, unregistred user!
我的意思是当鼠标移动到按钮时,变成一种颜色,鼠标离开时变成另一种颜色。
我在SpeedButton的OnMouseMove时改变颜色,可是当鼠标离开时颜色就不变了,谢谢!
 
另外在SpeedButton的Parent的OnMouseMove中改颜就可以了。
 
比如说你的SpeedButton是放在Form上的,那你在Form的MouseMove中将SpeedButton改成
另一种颜色,明白了?
 
这样写即可:
比如修改tpanel的颜色,在tpanel的OnMouseMove事件中写:
tpanel(sender).color := clred;
 
多人接受答案了。
 
顶部