楼主 用Tstream 保存form时,如何只保存组件名称和值?
如:
form 上有edit1.txt:='txt';..............
用tstream.component 保存的文件为
TPF0TForm1Form1Left Top Width?Height?
ActiveControlButton1CaptionForm1Color clBtnFace Font.CharsetDEFAULT_CHARSET
Font.Color clWindowText Font.Height?Font.Name
MS Sans Serif
Font.Style OldCreateOrderVisible
PixelsPerInch`
TextHeight
TEditEdit1Left Top`WidthyHeightTabOrder Text
1234566676 TEditEdit2Left Top WidthyHeightTabOrderText 21234566676 TEditEdit3Left Top WidthyHeightTabOrderTextEdit3 TEditEdit4Left Top WidthyHeightTabOrderTextEdit4 TEditEdit5Left Top WidthyHeightTabOrderTextEdit5 TEditEdit6Left Top WidthyHeightTabOrderTextEdit6 TCheckBox CheckBox1LeftxTop`WidthaHeightCaption CheckBox1TabOrder TCheckBox CheckBox2LeftxTop WidthaHeightCaption CheckBox2TabOrder TCheckBox CheckBox3LeftxTop WidthaHeightCaption CheckBox3TabOrder TCheckBox CheckBox4LeftxTop WidthaHeightCaption CheckBox4TabOrder TCheckBox CheckBox5LeftxTop WidthaHeightCaption CheckBox5TabOrder
TCheckBox CheckBox6LeftxTop(WidthaHeightCaption CheckBox6TabOrder TButtonButton1Left TopWidthKHeightCaptionwriteTabOrder OnClick Button1Click TButtonButton2Left8TopWidthKHeightCaptionreadTabOrder
OnClick Button2Click
我只需保存为如下
TPF0edit1 txt edit2 txt2..........
我看到别人做到了 请哪位大虾赐教 谢谢!
如:
form 上有edit1.txt:='txt';..............
用tstream.component 保存的文件为
TPF0TForm1Form1Left Top Width?Height?
ActiveControlButton1CaptionForm1Color clBtnFace Font.CharsetDEFAULT_CHARSET
Font.Color clWindowText Font.Height?Font.Name
MS Sans Serif
Font.Style OldCreateOrderVisible
PixelsPerInch`
TextHeight
TEditEdit1Left Top`WidthyHeightTabOrder Text
1234566676 TEditEdit2Left Top WidthyHeightTabOrderText 21234566676 TEditEdit3Left Top WidthyHeightTabOrderTextEdit3 TEditEdit4Left Top WidthyHeightTabOrderTextEdit4 TEditEdit5Left Top WidthyHeightTabOrderTextEdit5 TEditEdit6Left Top WidthyHeightTabOrderTextEdit6 TCheckBox CheckBox1LeftxTop`WidthaHeightCaption CheckBox1TabOrder TCheckBox CheckBox2LeftxTop WidthaHeightCaption CheckBox2TabOrder TCheckBox CheckBox3LeftxTop WidthaHeightCaption CheckBox3TabOrder TCheckBox CheckBox4LeftxTop WidthaHeightCaption CheckBox4TabOrder TCheckBox CheckBox5LeftxTop WidthaHeightCaption CheckBox5TabOrder
TCheckBox CheckBox6LeftxTop(WidthaHeightCaption CheckBox6TabOrder TButtonButton1Left TopWidthKHeightCaptionwriteTabOrder OnClick Button1Click TButtonButton2Left8TopWidthKHeightCaptionreadTabOrder
OnClick Button2Click
我只需保存为如下
TPF0edit1 txt edit2 txt2..........
我看到别人做到了 请哪位大虾赐教 谢谢!
请哪位大虾赐教 谢谢!
我是用来保存Form上edit框和checkbox的值到一个文件中。
因为有多个edit 又不想一条一条的太麻烦.
procedure DefineProperty(const Name: string; ReadData: TReaderProc; WriteData: TWriterProc; HasData: Boolean); virtual; abstract;
大家知道 readdata,writedata 怎么设吗????????
如何遍历所有的组件啊??