How do I use OnGetMemo?
procedure TForm1.mem1GetMemo(Sender: TObject; aLines: TStrings);
begin
memGL_Text.Lines.Assign(aLines);
end;
Gives me a Stack Overflow.
I want to add a blank line (or sometimes a piece of text) to the
bottom of memo lines comming from disk. Like so...
procedure TForm1.mem1GetMemo(Sender: TObject; aLines: TStrings);
begin
aLines.Add('THIS IS MY REPORT');
memGL_Text.Lines.Assign(aLines);
end;
No go.
begin
memGL_Text.Lines.Assign(aLines);
end;
Gives me a Stack Overflow.
I want to add a blank line (or sometimes a piece of text) to the
bottom of memo lines comming from disk. Like so...
procedure TForm1.mem1GetMemo(Sender: TObject; aLines: TStrings);
begin
aLines.Add('THIS IS MY REPORT');
memGL_Text.Lines.Assign(aLines);
end;
No go.
This discussion has been closed.
Comments
procedure TForm1.mem1GetMemo(Sender: TObject; aLines: TStrings);
begin
mem1.Lines.Assign(aLines);
end;
Gives me a Stack Overflow.
I want to add a blank line (or sometimes a piece of text) to the
bottom of memo lines comming from disk. Like so...
procedure TForm1.mem1GetMemo(Sender: TObject; aLines: TStrings);
begin
aLines.Add('THIS IS MY REPORT');
mem1.Lines.Assign(aLines);
end;
No go.
Nard? Somebody?
call Self.Assign(Self). Either call methods on the aLines parameter or on
the Memo.Lines object.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Please use your real name for your news account when you post to the Digital
Metaphors newsgroups- Thankyou.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
I started by doing this:
aLines.Add('THIS IS MY TEXT');
However, from the RB help, if there is an OnGetMemo assigned, then the
DBmemo component doesn't automatically get the lines assigned to it,
and sure enough, my memos come out blank. I can add my line of text,
but how do I tell the DBmemo that I now want the aLines to be printed?
OnGetText for the dbText component was easy to understand. This seems
more difficult. I need a small example.
Kev.
parameter is empty coming into this event because the data hasn't been
pulled from the pipeline. Assigning the memo data is you responsibility when
this event is assigned.
procedure TForm1.ppDBMemo1GetMemo(Sender: TObject; aLines: TStrings);
begin
if True then
aLines.Text := 'Hello there.'
else
aLines.Text := ppReport1.DataPipeline['Notes'] {From DBDemos Biolife
table}
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com