Solved

With Richedit center a title and tab a line

Posted on 2002-04-03
3
678 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
[X]
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
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi selector screen 2 92
Need Help Delphi 2010 CheckBox1 Stored value in memo 13 81
enhance the following code 3 42
Delphi: sending SMS on android platform 1 69
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 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