怎样才能用这个MouseInControl的呢
编号:QA004111
建立日期: 2001年4月15日 最后修改日期:2001年4月15日
所属类别:
guzh:
操作系统:win98
编程工具:BCB5
问题:我在BCB5的HELP查到TSpeedButton有这个属性
Specifies whether the mouse pointer is over the speed button.
__property bool MouseInControl = {read=FMouseInControl, nodefault};
Description
Use MouseInControl to determine whether the mouse pointer is over the speed button.
但是我用SpeedButton1->时找不到这个属性呀,请问怎样才能用这个MouseInControl的呢!
回答:
在C++BUILDER 中的TSpeedButton组件的MouseInControl属性是一个受保护的未发布的属性,所以,你直接是用不了的,你可以从此组件派生一个组件,在派生组件中将其发布,再安装这个派生组件,就可以了。如:
class TMySpeedButton:public TSpeedButton{
public:
TMySpeedButon(TComponent* Owner)();
__published:
__property MouseInControl;
}
此问题由李海回答。
| |
|
|
| |
|
|