计算机应用 | 古代文学 | 市场营销 | 生命科学 | 交通物流 | 财务管理 | 历史学 | 毕业 | 哲学 | 政治 | 财税 | 经济 | 金融 | 审计 | 法学 | 护理学 | 国际经济与贸易
计算机软件 | 新闻传播 | 电子商务 | 土木工程 | 临床医学 | 旅游管理 | 建筑学 | 文学 | 化学 | 数学 | 物理 | 地理 | 理工 | 生命 | 文化 | 企业管理 | 电子信息工程
计算机网络 | 语言文学 | 信息安全 | 工程力学 | 工商管理 | 经济管理 | 计算机 | 机电 | 材料 | 医学 | 药学 | 会计 | 硕士 | 法律 | MBA
现当代文学 | 英美文学 | 通讯工程 | 网络工程 | 行政管理 | 公共管理 | 自动化 | 艺术 | 音乐 | 舞蹈 | 美术 | 本科 | 教育 | 英语 |

创建自己的Dephi构件网络毕业论文(2)

2013-10-21 01:13
导读:1. 选中Component菜单项中的 New Component选项,在 Ancestor Type 框填入Tlabel,在 Class Name框中填入 TnewLabel ,在 Palette Page框中填入 Samples,在 Unit File Name 框中填入

1. 选中Component菜单项中的 New Component选项,在 Ancestor Type 框填入Tlabel,在 Class Name框中填入 TnewLabel ,在 Palette Page框中填入 Samples,在 Unit File Name 框中填入 NewCom.pas ,然后单击按钮 Create Unit就进入到代码编辑状态。

2. 使用 Tools菜单中Image Editor来创建编辑文件NewCom.dcr,为 TnewLabel类建立位图。

3. 增加新属性EnterTextColor ,并为读写属性增加私有方法 SetEnterTextColor和私有变

量 FenterTextColor。

加入如下的代码:

Private

FenterTextColor : Tcolor;

SetEnterTextColor(Acolor :Tcolor);

Published

Property EnterTextColor : Tcolor

Read FenterTextColor Write SetEnterTextColor(Acolor);

Implementation

Procedure TnewLabel.SetEnterTextColor(Acolor :Tcolor);

Begin

FEnterTextColor:=Acolor;

End;

下一页

上一篇:缓冲区溢出攻击的分析及防范策略网络毕 下一篇:没有了