I have a project that uses Edit boxes for Text Input.
These are saved to a LogRec file XXX.dat
I have Stringgrid1 on my form set up with all the proper columns etc.
How do I load these records into Stringgrid1?
I have looked all over for documentation and can't find what I need. I hope I have given enough information.
Thanks for your help,
Bob
These are saved to a LogRec file XXX.dat
Code:
type {Log Records}
TLogRec = record
Name : String[15];
Station : String[10];
Freq : String[10];
...
qslr : String[5];
timeoff : String[9];
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
...
Edit14: TEdit;
Edit15: TEdit;
const
MAXRECS = 2000;
procedure TForm1.SetRecVals;
begin
with AddrRec do begin
Name := Edit1.Text;
Station := Edit2.Text;
Freq := Edit3.Text;
Mode := Edit4.Text;
qth := Edit5.text;
prov := Edit6.Text;
power := Edit7.Text;
rsts := Edit8.Text;
rstr := Edit9.Text;
date := Edit10.Text;
time := Edit11.Text;
qsls := Edit12.Text;
qslr := Edit13.Text;
timeoff := Edit15.Text;
end;
end;
procedure TForm1.ReadRec;
begin
Read(AddrFile, AddrRec);
with AddrRec do begin
Edit1.Text := Name;
Edit2.Text := Station ;
Edit3.Text := Freq ;
Edit4.Text := Mode ;
Edit5.text := qth ;
Edit6.Text := prov ;
Edit7.Text := power ;
Edit8.Text := rsts;
Edit9.Text := rstr ;
Edit10.Text := date;
Edit11.Text := time;
Edit12.Text := qsls;
Edit13.Text := qslr;
Edit15.Text := timeoff;
end;
Seek(AddrFile, FilePos(AddrFile) - 1);
end;
How do I load these records into Stringgrid1?
I have looked all over for documentation and can't find what I need. I hope I have given enough information.
Thanks for your help,
Bob