Solved

About Line Spacing in TRichEdit

Posted on 1998-10-15
6
1,089 Views
Last Modified: 2008-03-17
Is it possible to change line spacing in TRichEdit, from 1.0
  to 1.5 or 2.0?
  If it is possible, then would you give me the example (in
  source code) of how to do it?
  I use Delphi 3, so please keep the source code work in Delphi 3.

Thanks anyway for the help and attention ^_^

Stinger
0
Comment
Question by:stinger_60284
  • 2
  • 2
  • 2
6 Comments
 
LVL 4

Accepted Solution

by:
BoRiS earned 50 total points
ID: 1343103
stinger_60284

here is the code to do just that, only selected text...

var
  format: TCharFormat;
 begin                      
  FillChar( DblSpace, sizeof(DblSpace), 0);
    with format do begin
      cbSize:= Sizeof(DblSpace);
      dwMask:= CFM_OFFSET;
      yOffset:= 60;
    end;
  RichEdit1.Perform( EM_SETCHARFORMAT, SCF_SELECTION,
                    LongInt(@DblSpace));

Later
BoRiS
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1343104
Hello BoRiS :->

.And what type is DblSpace is suppose to be??? Integer?? //just an example
0
 

Author Comment

by:stinger_60284
ID: 1343105
Is it just for the selected text?
How to convert it to the everyline in TRichEdit?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 4

Expert Comment

by:BoRiS
ID: 1343106
stinger_60284

RichEdit1.SelectAll; //will select all the lines and text then call the procedure I gave you

viktornet

Sorry :-)

that should be

var
 DblSpace: TCharFormat;
begin
..

Later
BoRiS
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1343107
10x :-)
0
 

Author Comment

by:stinger_60284
ID: 1343108
Great!!! Thanks for the answer!!!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

706 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

18 Experts available now in Live!

Get 1:1 Help Now