Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

With Richedit center a title and tab a line

Posted on 2002-04-03
3
Medium Priority
?
692 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 400 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

636 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