Delphi XE之路(11)Delphi XE5 给Edit增加自定义按钮

简介: <span style="color:rgb(64,64,64); font-family:simsun; font-size:14px; line-height:21px; background-color:rgb(135,123,16)">手机上的Edit,如果增加一个按钮,会非常方便用户操作,XE5为我们想到了,下面看看如何为一个TEdit增加一个按钮:</span><br styl
手机上的Edit,如果增加一个按钮,会非常方便用户操作,XE5为我们想到了,下面看看如何为一个TEdit增加一个按钮:
1.在Form上放一个TEdit,然后双击Edit,会弹出增加按钮的窗口
Delphi <wbr>XE5 <wbr>给Edit增加自定义按钮
2.选择增加按钮的类型,目前支持7个:
Delphi <wbr>XE5 <wbr>给Edit增加自定义按钮

3.选择后,点Add Item,会生成一个按钮对象,和正常的Button是一样的,这里,我们增加一个Clear按钮,用来清空Edit的内容:

Delphi <wbr>XE5 <wbr>给Edit增加自定义按钮

4.编码新增按钮的Click事件:
procedure TForm1.ClearEditButton1Click(Sender: TObject);
begin
   Edit1.Text:='';
end;
5.可以为Edit增加多个按钮。
Delphi <wbr>XE5 <wbr>给Edit增加自定义按钮

结论:这开发效率,不减当年!
目录
相关文章
|
Java Android开发 UED
delphi xe 之路(30)Delphi XE7 update1进步太大了
<span style="background-color:rgb(255,255,255)"><span style="color:rgb(64,64,64); font-family:'Microsoft YaHei','Helvetica Neue',SimSun; font-size:14px; line-height:21px">1.更新的bug列表并不全</span><br s
2566 0
|
安全 Windows
Delphi XE之路(7)Mobile MessageDlg函数
<div style="margin:0px; padding:0px; font-family:punctuation,微软雅黑,Tohoma; font-size:14px; line-height:22px"> <span style="margin:0px; padding:0px; color:rgb(50,62,50); font-family:simsun">在用XE5创建
2697 0
delphi xe之路(15)ListView MultiDetail
<span style="font-family:punctuation,微软雅黑,Tohoma; font-size:14px; line-height:22px">经过操作后,要设置MultiDetail下Image的visible为TRUE! 要不然图片不会显示!</span>
3127 0
|
iOS开发
delphi xe 之路(17)建立分段的button按钮
<div style="margin:0px; padding:0px; font-family:punctuation,微软雅黑,Tohoma; font-size:14px; line-height:22px">  <span style="margin:0px; padding:0px; color:rgb(68,68,68); font-family:Tahoma,Helveti
2916 0
Delphi XE之路(4)横屏问题
<span style="font-family:punctuation,微软雅黑,Tohoma; font-size:14px; line-height:22px">    查资料,drawable-port下为竖屏,drawable-land为横屏。在工程文件里再次添加loading.png文件,设置输出路径为drawable-land,编译执行。横屏下也能执行了!</span><br
1887 0
Delphi XE 之路(6)手势操作
<div style="margin:0px; padding:0px; font-family:punctuation,微软雅黑,Tohoma; font-size:14px; line-height:22px">  <span style="margin:0px; padding:0px; color:rgb(50,62,50); font-family:simsun">1.在窗体上
3229 0
|
Android开发
Delphi XE之路(9)Delphi XE android mutilistview
<p style="margin:10px auto; color:rgb(77,77,77); font-family:Tahoma,Geneva,Arial,Helvetica,sans-serif; font-size:13px; line-height:26px"> C:\Users\Public\Documents\RAD Studio\12.0\Samples\FireMon
4630 0
delphi xe 之路(23)clientdataset的locate函数
<div style="margin:0px; padding:0px; font-family:punctuation,微软雅黑,Tohoma; font-size:14px; line-height:22px">  <span style="margin:0px; padding:0px; color:rgb(51,51,51); font-family:arial,'courier
2794 0