type
PColorS7 = ^TColorS7REC;
TColorS7REC = record
Light : WORD;
Dark : WORD;
Line : WORD;
Fill : WORD;
Font : WORD;
end;
type
TTMStaticS7 = class(TStaticText)
private
f_Length: WORD;
f_ColorS7: TColorS7REC;
published
property Length: WORD read f_Length write f_Length;
property ColorS7: TColorS7REC read f_ColorS7 write f_ColorS7; //在組件編輯器中設置該屬性
end;
procedure TColorDesignEditor.ExecuteVerb(Index: Integer);
begin
inherited;
case Index of
0: begin
f_DesignForm:= TColorDesignForm.Create(application);
try
f_DesignForm.edtLight.Text:= inttostr((Component as TTMStaticS7).ColorS7.Light);
f_DesignForm.edtDark.Text:= inttostr((Component as TTMStaticS7).ColorS7.Dark);
f_DesignForm.edtLine.Text:= inttostr((Component as TTMStaticS7).ColorS7.Line);
f_DesignForm.edtFill.Text:= inttostr((Component as TTMStaticS7).ColorS7.Fill);
f_DesignForm.edtFont.Text:= inttostr((Component as TTMStaticS7).ColorS7.Font);
if f_DesignForm.showModal = mrOK then
begin
if Component is TTMStaticS7 then
begin
(Component as TTMStaticS7).f_ColorS7.Light:= strtoInt(f_DesignForm.edtLight.Text);
(Component as TTMStaticS7).f_ColorS7.Dark:= strtoInt(f_DesignForm.edtDark.Text);
(Component as TTMStaticS7).f_ColorS7.Line:= strtoInt(f_DesignForm.edtLine.Text);
(Component as TTMStaticS7).f_ColorS7.Fill:= strtoInt(f_DesignForm.edtFill.Text);
(Component as TTMStaticS7).f_ColorS7.Font:= strtoInt(f_DesignForm.edtFont.Text);
end;
{if Component is then
begin
end;}
end;
finally
f_DesignForm.Free;
end;
end;
end;{case}
end;
PColorS7 = ^TColorS7REC;
TColorS7REC = record
Light : WORD;
Dark : WORD;
Line : WORD;
Fill : WORD;
Font : WORD;
end;
type
TTMStaticS7 = class(TStaticText)
private
f_Length: WORD;
f_ColorS7: TColorS7REC;
published
property Length: WORD read f_Length write f_Length;
property ColorS7: TColorS7REC read f_ColorS7 write f_ColorS7; //在組件編輯器中設置該屬性
end;
procedure TColorDesignEditor.ExecuteVerb(Index: Integer);
begin
inherited;
case Index of
0: begin
f_DesignForm:= TColorDesignForm.Create(application);
try
f_DesignForm.edtLight.Text:= inttostr((Component as TTMStaticS7).ColorS7.Light);
f_DesignForm.edtDark.Text:= inttostr((Component as TTMStaticS7).ColorS7.Dark);
f_DesignForm.edtLine.Text:= inttostr((Component as TTMStaticS7).ColorS7.Line);
f_DesignForm.edtFill.Text:= inttostr((Component as TTMStaticS7).ColorS7.Fill);
f_DesignForm.edtFont.Text:= inttostr((Component as TTMStaticS7).ColorS7.Font);
if f_DesignForm.showModal = mrOK then
begin
if Component is TTMStaticS7 then
begin
(Component as TTMStaticS7).f_ColorS7.Light:= strtoInt(f_DesignForm.edtLight.Text);
(Component as TTMStaticS7).f_ColorS7.Dark:= strtoInt(f_DesignForm.edtDark.Text);
(Component as TTMStaticS7).f_ColorS7.Line:= strtoInt(f_DesignForm.edtLine.Text);
(Component as TTMStaticS7).f_ColorS7.Fill:= strtoInt(f_DesignForm.edtFill.Text);
(Component as TTMStaticS7).f_ColorS7.Font:= strtoInt(f_DesignForm.edtFont.Text);
end;
{if Component is then
begin
end;}
end;
finally
f_DesignForm.Free;
end;
end;
end;{case}
end;
解决方案 »
- dephi中怎样把单个控件的透明度改变
- 各位大哥,如何在richedit控件上显示镜向字体,也就是反向字体???
- 求救,急等,谢谢先!
- delphi中的T是哪个单词的缩写啊
- [06.18] . . . . . 请教如何直接写Variant数组的数据
- 初学,请问怎样判断一个string变量是否为null,语句怎么写
- 我的坦克为什么这么一点儿大??????????
- 客户机提示File is locked
- 使用键盘问题
- 请教,在delphi有没有比writeln更快的写文件的方法?
- “贺岁华东行”--与技术总监和Borland产品专家面对面2004元旦期间课程简介
- 大家知道treeview中的treeadditem是怎么用的吗 在线等 谢谢大家帮忙 特急
你是要写入自己定义的类型吧。。好像要自己处理reader和writer的。。