Hello, I want to copy some lines from one RichEdit to another, say, lines 2-4 of RE1 into (empty) RE2. Using RE2.Lines.Add(RE1.Lines[3]) only copies the text, not the formatting. How can I copy text and formatting of selected lines?
The larger issue: I want to display any of a dozen sets of information (rich edit text), depending upon which button is clicked. I don't want to have to manage a dozen separate .RTF files (i.e., read the appropriate .RTF file into my form's RichEdit). I'd rather have a single .RTF file and use delimiter lines (e.g., a line with just an "=") to separate the different buttons' associated information. Currently, I LoadFromFile the single .RTF file into a (hidden) RichEdit (this retains the formatting), then search for the n-th delimiter line and copy, into RE2, the text between that line and the next delimiter line, using the code shown above. However, that method loses the formatting. I'm using D5. I'm also using Raize Components' tRzRichEdit, although I doubt that adds or subtracts anything from tRichEdit that might be useful in this situation. All suggestions most welcome. Thanks, -- Stan _______________________________________________ Delphi mailing list -> Delphi@elists.org http://lists.elists.org/cgi-bin/mailman/listinfo/delphi