Solved

With Richedit center a title and tab a line

Posted on 2002-04-03
3
675 Views
Last Modified: 2013-11-22
I have loaded a richedit component with lines from a text file.  I would like to center the first line and put a tab in front of the third line.  I've been searching for hours and can't find any good info on using the richedit component.  It would be great if anyone could also direct me to some good info on using richedit.
Thanks.
0
Comment
Question by:johntegg
3 Comments
 
LVL 1

Expert Comment

by:sundayboys
ID: 6916776
u can see sample code in ($delphi)\Demos\RicheEidt,that is a good example.
0
 
LVL 1

Accepted Solution

by:
MBo earned 100 total points
ID: 6917227
After loading

with RichEdit1 do begin
        SelStart:=0;
        SelLength:=Length(Lines[0]); //select 1st line
        Paragraph.Alignment:=taCenter;//for current selection
        Lines[2]:=#9+Lines[2];//#9 - Tab character
        SelLength:=0;  //remove selection
end;
0
 

Author Comment

by:johntegg
ID: 6917855
Thanks a bunch to both of you.  That was exactly what I needed to get the job done!
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question