Delphi and Kylix

Moderators: pritaeas
Number of threads: 7244
Number of posts: 19051

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Place String in rich edit Posted by rajsha on 3 Oct 2004 at 3:38 AM
Could someone show me how to place a string at a given point (say at the centre) in a line of Rich Edit without using #9.

Report
Re: Place String in rich edit Posted by zibadian on 3 Oct 2004 at 3:47 AM
: Could someone show me how to place a string at a given point (say at the centre) in a line of Rich Edit without using #9.
:
:
The simplest way to do this is to select the line by setting SelStart and SelLength. Then change the TextAttributes to match what you want to have. I don't have Delphi here, so I cannot provide you with code, but you can find more info (including the precise property names) on these in the help files.
Report
Re: Place String in rich edit Posted by injektilo on 4 Oct 2004 at 4:49 AM
: : Could someone show me how to place a string at a given point (say at the centre) in a line of Rich Edit without using #9.
: :
: :
: The simplest way to do this is to select the line by setting SelStart and SelLength. Then change the TextAttributes to match what you want to have. I don't have Delphi here, so I cannot provide you with code, but you can find more info (including the precise property names) on these in the help files.
:
  RichEdit1.Paragraph.Alignment := taCenter;




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.