All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
ASP.NET生成静态HTML页面并分别按年月目录存放_.net资料_编程技术
无废话C#设计模式之四:Factory,Method_.net资料_编程技术
ASP.NET,2.0角色及成员管理_[Asp.Net教程]
PHP实例:PHP实现上传文件生成小图加文字的实例_[PHP教程]
c#时间增加并对比做法_[Asp.Net教程]
SQL,Server,存储过程的分页_[SQL,Server教程]
php和explode_php资料_编程技术
数据库正规化和设计技巧(1)_mssql学习_编程技术
Session丢失原因与解决方案小结_[Asp.Net教程]
Excel,数据导入到,Access、Sql,Server,中示例代码_[SQL,Server教程]
Reading number is top 10 pictures
NeedWallpaper9
The real super beauty15
避免防盗门的猫眼变成钥匙眼
Athena chu perspective cheongsam shine with New York
Beauty shocked Japan Tokyo motor show model
A man's favorite things3--ZhouWeiTong
Forced sex girl living abroad1
Is said to be a Chinese female artist fame explicit pictures before2
漂亮脸蛋魔鬼身材2
China's first snake village2
Download software ranking
Sora aoi 120 minutes
Rio big adventure
WebService在.NET中的实战应用教学视频 → 第2集
Proficient in Eclipse
WebService在.NET中的实战应用教学视频 → 第1集
电车之狼R
软件工程思想
matrix2
Unix video tutorial11
Prostitutes diary
aaa published in(发表于) 2014/7/19 0:10:09 Edit(编辑)
Delphi动态按钮的窗体界面

Delphi动态按钮的窗体界面

Delphi动态按钮的窗体界面

Delphi动态按钮的窗体界面

实例说明

在窗体界面中,通常以按钮来代替菜单栏的功能,这种形式虽然给用户一种直观、界面风格各异的感觉,但通常按钮都是以静态的形式显示,如果光标移到按钮时,可以使按钮上的图片和文字说明动态变化,使用户很快捷的找到所选按钮。这样就需要一个动态的按钮显示界面。本例运行效果如图1.20所示。



图1.20动态按钮的窗体界面

技术要点

在编辑过程中,首先在SpeedButton控件中的Glyph属性中添加图片,然后设置SpeedButton控件的Layout属性为blGlyphLeft,使图片左对齐。但是必须在相应控件的OnMouseMove事件中设置SpeedButton控件的动态图片。

实现过程

1.新建一个标准工程,创建一个新窗体,设置窗体的Name属性为Form74。

2.添加TImage、TSpeedButton、TStatusBar和TTimer组件。

3.相关组件的主要属性如表1.9所示。



表1.9 主要组件的属性设置

4.主要程序代码如下:

procedure TForm74.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,

Y: Integer);

begin

SpeedButton1.Caption := '公司信息管理';

SpeedButton2.Caption := '部门信息管理';

SpeedButton3.Caption := '人员类别管理';

SpeedButton4.Caption := '银行信息管理';

SpeedButton5.Caption := '员工信息管理';

SpeedButton6.Caption := '员工调动管理';

SpeedButton7.Caption := '操作权限管理';

SpeedButton8.Caption := '系 统 退 出';

SpeedButton9.Layout := blGlyphLeft;

SpeedButton10.Layout := blGlyphLeft;

SpeedButton11.Layout := blGlyphLeft;

SpeedButton12.Layout := blGlyphLeft;

SpeedButton13.Layout := blGlyphLeft;

end;




添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.