With Richedit center a title and tab a line

Posted on 2002-04-03
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.
Question by:johntegg
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

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

Accepted Solution

MBo earned 100 total points
ID: 6917227
After loading

with RichEdit1 do begin
        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

Author Comment

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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

691 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