Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I find bottom line of text in a rich text box?

Status
Not open for further replies.

tedsmith

Programmer
Nov 23, 2000
1,762
AU
I suspect this can only be done by APIs. I saw some RTF stuff concerning C but I cant relate it to VB - here goes:-

I want to use 2 to 5 lines of large Rich text fonts (variable 70 to 130pt)in a fixed size screen window.
Problem is I need 2 option buttons:
1. Automatically vertically center a small message if it doesnt fill the screen.(Insert small blank lines at the top until there is the same blank vertical space above and below the characters)
2. Automatically increase the font size until it just fills the window? (Adjust the selfontsize until bottom of text is just above the bottom of the window)
I can measure horizontal text width but how do I measure where the bottom of the last line of text is in the RTF box?
 
I've pointed you to a possible solution to this in your duplicate post in thread222-797660
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top