本文整理自网络,侵删。
unit Unit1;
interface
uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type TForm1 = class(TForm) Label1: TLabel; Edit1: TEdit; Edit2: TEdit; Edit3: TEdit; Edit4: TEdit; btnDo: TButton; procedure btnDoClick(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.btnDoClick(Sender: TObject);var i: integer;begin for i := 0 to ComponentCount - 1 do begin if (Components[i] is TEdit) and (TEdit(Components[i]).color = clred) then TEdit(Components[i]).Left := TEdit(Components[i]).Left + 5; end;end;
end.
相关阅读 >>
Delphi三层开发小技巧:tclientdataset的delta妙用
Delphi xe7实现获取程序是否已管理员模式运行以及运行的windows用户名
Delphi xe5 android 解决ide真机调试不起问题
Delphi android实例-trectangle加载图片(xe8+小米2)
Delphi tms web core webmemo 横竖滚动条
更多相关阅读请进入《Delphi》频道 >>