Delphi

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsDesktop ProgrammingDelphi

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old July 30th, 2007, 07:35 AM
dgcarter dgcarter is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 1 dgcarter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 36 m 41 sec
Reputation Power: 0
Rich Edit

How would one align text in the center of a rich edit box?
Not left to right, but centered from top to bottom... so bacically in the middle of the box.

Reply With Quote
  #2  
Old August 22nd, 2007, 01:55 PM
harleyflanders harleyflanders is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Posts: 3 harleyflanders User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 3 sec
Reputation Power: 0
Try a little experimentation

Quote:
Originally Posted by dgcarter
How would one align text in the center of a rich edit box?
Not left to right, but centered from top to bottom... so bacically in the middle of the box.


Your TRichEdit has a height (in pixels). Call it RH. Its font has a measure of height also; there are two -- use the one that includes the leading. Call it FH. If your text is L lines, it;s height is
FH*L. You want (RH - FH*L) div 2 blank lines before your text.
This should help if you know in advance the number of lines
you will enter. If you want to text to continue centering vertically as you enter them--I have to think this one over! HF

Reply With Quote
Reply

Viewing: Tutorialized ForumsDesktop ProgrammingDelphi > Rich Edit


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap