Solved

With Richedit center a title and tab a line

Posted on 2002-04-03
3
671 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now