Forum > LCL
How to clear a TMemo out of lines?
Elmug:
Good people:
I have the Memo1 with a few lines, how to clear it to zero lines?
I tried lines.count := 0; but that did not work.
Then after I clear it, how to put just one line into it, for example: 'This is line1'.
And also, where can I find documentation on how to use these methods? that start with a .dotMethod for TMemos, and just as well for other type of objects?
Thanks!
meulinux:
Memo1.Lines.Clear;
::)
Elmug:
--- Quote from: meulinux on September 07, 2011, 04:20:58 am ---Memo1.Lines.Clear;
::)
--- End quote ---
Great help, meulinux.
That's a powerful statement.
Now, if you don't mind, where can I learn things like that (part of my original question).
Thanks!
felipemdc:
--- Quote from: Elmug on September 07, 2011, 03:42:48 am ---And also, where can I find documentation on how to use these methods? that start with a .dotMethod for TMemos, and just as well for other type of objects?
--- End quote ---
In google, I just typed "lazarus TMemo" without quotes and the first link was the reference documentation:
http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/tmemo.html
And then you can click on links there are find the reference for TMemo.Lines:
http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/tcustommemo.lines.html
Then click on TStrings:
http://lazarus-ccr.sourceforge.net/docs/rtl/classes/tstrings.html
Where you can read:
procedure Clear; virtual; abstract; Removes all strings and associated objects from the list.
There are also links to docs here: http://wiki.lazarus.freepascal.org/LCL_Components
One other thing, please try to keep questions about the LCL in the LCL sub-forum =) thanks
BigChimp:
--- Quote from: Elmug on September 07, 2011, 05:24:12 am ---Now, if you don't mind, where can I learn things like that (part of my original question).
--- End quote ---
See this post - and the next for sources of information on FreePascal, Delphi (handy, as Lazarus is almost always compatible), and Lazarus:
http://lazarus.freepascal.org/index.php/topic,13951.msg73534.html#msg73534
Don't know if I mentioned it there, but Delphi online documentation can help, too:
http://docwiki.embarcadero.com/RADStudio/en/Main_Page, especially the pages under Delphi Reference
Hope this helps,
BigChimp
Navigation
[0] Message Index
[#] Next page