471,310 Members | 995 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

Text Wrapping In RichTextBox Control

Hi All,
I've got a RichTextBox control that has some variable length & language text
in it that was retrieved from a resource file. When the text gets long
enough the control automatically warps it onto another line. I need to
determine how many total lines are being displayed including any wrapped
lines. This is not the same as the RichTextBox control's Lines.Length
property. How can I determine if the control has indeed needed to wrap the
text onto additional line(s)? I can't count char's because the font in use
has different widths for different chars. Is there some way to calcuate the
physical width of the text on a per char basis and compare that total to the
width of the control to figure this out. Or is there some other mechanism
that is better? Anyone have any code to show me?


John Bowman
Verona, WI
Jan 1 '06 #1
0 1017

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Big D | last post: by
1 post views Thread by Able | last post: by
3 posts views Thread by michael sorens | last post: by
9 posts views Thread by =?Utf-8?B?QnJpYW4gQ29vaw==?= | last post: by
reply views Thread by eBob.com | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.