PC Review


Reply
Thread Tools Rate Thread

RichTextBox line heights

 
 
Beringer
Guest
Posts: n/a
 
      4th Feb 2005
Does anybody know a way to get the heights of the various lines of text in a
RichTextBox?

I'm not sure if "height" is the proper term. But what I'm getting at is
that if you set the
font size of some selected text on a line the entire line "height" expands
to the new font
size.

I want that!

Thanks in advance,
Eric



 
Reply With Quote
 
 
 
 
Ludovic SOEUR
Guest
Posts: n/a
 
      9th Feb 2005
use GetPositionFromCharIndex method.

you must know the index of your carrage return. for example, if your text is
"hello\nword" :
lineHeight=myRichText.GetPositionFromCharIndex(6).Y-myRichText.GetPositionFr
omCharIndex(5).Y;

Hope it helps.
Ludovic Soeur.


"Beringer" <(E-Mail Removed)> a écrit dans le message de
newsdFMd.8288$6u.5029@fed1read02...
> Does anybody know a way to get the heights of the various lines of text in

a
> RichTextBox?
>
> I'm not sure if "height" is the proper term. But what I'm getting at is
> that if you set the
> font size of some selected text on a line the entire line "height" expands
> to the new font
> size.
>
> I want that!
>
> Thanks in advance,
> Eric
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel: copy grid, widths & heights down page: heights wrong! why? =?Utf-8?B?Sw==?= Microsoft Excel Misc 1 24th Jun 2006 03:06 AM
Re: Copy the contents from richtextbox to another richtextbox with diff. font, style,collor backcolor etc. Alan Microsoft C# .NET 0 23rd Dec 2004 10:15 AM
Re: Copy the contents from richtextbox to another richtextbox with diff. font, style,collor backcolor etc. Liam McNamara Microsoft C# .NET 0 17th Nov 2004 11:33 AM
Re: Copy the contents from richtextbox to another richtextbox with diff. font, style,collor backcolor etc. Champika Nirosh Microsoft C# .NET 0 18th Oct 2004 05:23 AM
RichTextBox Copy and Paste from one RichTextBox to another. Sam Microsoft Dot NET Framework 1 9th Mar 2004 09:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:48 AM.