[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppVclTRichEdit
Forward declaration:
In the implementation (.cpp) file, #include ComCtrls.hpp:
Note that if the last line would be
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppVclTRichEdit
(C++ VCL) TRichEdit
Visual component used for text display and editing. It is similar to Microsoft's WordPad text editor window.Forward declaration:
namespace Comctrls { class TRichEdit; };
In the implementation (.cpp) file, #include ComCtrls.hpp:
- include <ComCtrls.hpp>
Adding a TStringList to a TRichEdit
Use TRichEdit's member function AddStrings.
std::auto_ptr<TStringList> stringList(new TStringList);
stringList->Add("Line1");
stringList->Add("Line2");
stringList->Add("Line3");
stringList->Add("Line4");
stringList->Add("Line5");
RichEdit1->Lines->AddStrings(stringList.release()); //Sets stringList to NULL
Note that if the last line would be
RichEdit1->Lines->AddStrings(stringList.get());there would be no problem (at least, not that I've noticed). But in the upper example, you can be sure that stringList will not be modified after adding it to the TRichEdit, as after adding it, it is set to NULL.
'TRichEdit' links
There is no CLX version of TRichEdit- C++ Builder
- Pascal VCL
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
