In article <ce9rhukiv2ipl94tqqtq63u3erfo50c...@4ax.com>, Manuel Algora
Quote
<ceni...@wanadoo.es> wrote:
>>.. because I think you have put Carriage Return characters in the text.
> It's the control itself that does it. Open the Lines property editor
> in the Object Inspector.
Oh, using the object inspector!
(it's the editor rather than the 'control itself')
And if you ask it to edit 'Lines' I suppose lines is what you will get,
reasonably enough.
I have been thinking about whether RAD really has any place in a finished
program, perhaps it is just for knocking up a quick prototype. (I intend to
refine my argument about this, I'm not really ready to kick off a full
discussion of it yet - and I know there are arguments against, too).
But this is yet another example, for my casebook, where loading at runtime
is better than using RAD.
Quote
> I would like to know the solution myself -other than deriving a fixed
> TMemo descendant, preferably.
M.Text:='Some line';
M.Lines[M.Lines.Count-1]:=M.Lines[M.Lines.Count-1]+' and some more stuff.';
.. etc. (I usually stick this last line in a proc called Addtext or
something).
If you use it often enough, making a descendant with an Addtext method looks
like a good way to go.
Another way: stick the text into a file and loadfromfile!
There should be a solution using SetTextBuffer, too (is this not what this
method is for?), but I haven't played with this.