📄 dfwlighteditesu.pas
字号:
unit DFWLightEditesU;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, DFWEdites;
type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
DFWLightEdites1: TDFWLightEdites;
DFWLightEdites2: TDFWLightEdites;
DFWLightEdites3: TDFWLightEdites;
GroupBox2: TGroupBox;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
DFWLightEdites4: TDFWLightEdites;
DFWLightEdites5: TDFWLightEdites;
DFWLightEdites6: TDFWLightEdites;
DFWLightEdites7: TDFWLightEdites;
DFWLightEdites8: TDFWLightEdites;
GroupBox3: TGroupBox;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
DFWLightEdites9: TDFWLightEdites;
DFWLightEdites10: TDFWLightEdites;
DFWLightEdites11: TDFWLightEdites;
Button1: TButton;
CheckBox1: TCheckBox;
Button2: TButton;
ColorDialog1: TColorDialog;
CheckBox2: TCheckBox;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure CheckBox2Click(Sender: TObject);
procedure CheckBox3Click(Sender: TObject);
procedure CheckBox4Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
DFWLightEdites5.Text:=DateToStr(Now);
DFWLightEdites8.Text:=TimeToStr(Now);
end;
procedure TForm1.Button1Click(Sender: TObject);
var i:integer;
begin
if ColorDialog1.execute then
for i:=1 to 11 do
TDFWLightEdites(FindComponent('DFWLightEdites'+inttostr(i))).FocusedColor:=ColorDialog1.Color;
end;
procedure TForm1.Button2Click(Sender: TObject);
var i:integer;
begin
if ColorDialog1.execute then
for i:=1 to 11 do
TDFWLightEdites(FindComponent('DFWLightEdites'+inttostr(i))).RequiredColor:=ColorDialog1.Color;
end;
procedure TForm1.CheckBox1Click(Sender: TObject);
var i:integer;
begin
for i:=1 to 11 do
TDFWLightEdites(FindComponent('DFWLightEdites'+inttostr(i))).FirstCharUppercase:=CheckBox1.checked;
end;
procedure TForm1.CheckBox2Click(Sender: TObject);
var i:integer;
begin
for i:=1 to 11 do
TDFWLightEdites(FindComponent('DFWLightEdites'+inttostr(i))).Required:=CheckBox2.checked;
end;
procedure TForm1.CheckBox3Click(Sender: TObject);
var i:integer;
begin
{ for i:=1 to 11 do
if CheckBox3.checked then
TDFWLightEdites(FindComponent('DFWLightEdites'+inttostr(i))).Keys:=TDFWLightEdites(FindComponent('DFWLightEdites'+inttostr(i))).Keys + [ksReturn]
else
TDFWLightEdites(FindComponent('DFWLightEdites'+inttostr(i))).Keys:=TDFWLightEdites(FindComponent('DFWLightEdites'+inttostr(i))).Keys - [ksReturn];}
end;
procedure TForm1.CheckBox4Click(Sender: TObject);
var i:integer;
begin
{ for i:=1 to 11 do
if CheckBox4.checked then
TDFWLightEdites(FindComponent('DFWLightEdites'+inttostr(i))).Keys:=TDFWLightEdites(FindComponent('DFWLightEdites'+inttostr(i))).Keys + [ksEscape]
else
TDFWLightEdites(FindComponent('DFWLightEdites'+inttostr(i))).Keys:=TDFWLightEdites(FindComponent('DFWLightEdites'+inttostr(i))).Keys - [ksEscape]; }
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -