Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: TO REGISTER, contact tech support:
http://cwsof.com/support.html
Computer Workshop
>
Computer Workshop Software User Forums
>
EZGUI Professional General Questions
>
Depth of text
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Depth of text (Read 244 times)
Brian Reynolds
PreRelease 4.5
Sr. Member
Posts: 304
Depth of text
«
on:
March 26, 2012, 08:03:27 PM »
Is is possible to get the depth, in pixels, of the text in a RichTextBox?
An alternative would be to get the number of lines of text so one could calculate the depth in pixels.
Logged
Chris Boss
Administrator
Hero Member
Posts: 1800
Re: Depth of text
«
Reply #1 on:
March 26, 2012, 09:45:57 PM »
Use EZ_GetRichFont to get the font type and size of the text.
Use EZ_DefFont to create a font using that font data.
use EZ_GetTextSize to determine the width and height of the text.
Use EZ_FreeFont to free the font you created.
Logged
Brian Reynolds
PreRelease 4.5
Sr. Member
Posts: 304
Re: Depth of text
«
Reply #2 on:
March 26, 2012, 11:56:45 PM »
Chris,
That wasn't what I meant.
What I would like to achieve is get the depth of all the text in a RichTextBox.
For instance, I want to know how far from the top of the first line of text to the bottom of the last line of text which would include all of the different sizes of text that may be in that block of text.
If there are 200 lines of text, how far from top to bottom?
Logged
Chris Boss
Administrator
Hero Member
Posts: 1800
Re: Depth of text
«
Reply #3 on:
March 27, 2012, 07:04:24 AM »
I don't see any single message which will do what you want.
Are you just trying to just see what the total height is of all the lines of text combined ?
You would think it could do that, but I don't see how.
The SDK docs I am using though are not the latest though (good for Windows 95 to ME), so you may want to check MSDN to see if there are any messages I have missed.
Logged
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Announcements
-----------------------------
=> General Announcements
=> What is EZGUI 5.0 Professional all about ?
=> Bug Reports
=> Legacy version: What is EZGUI 4.0 Pro all about ?
-----------------------------
Teach me EZGUI !
-----------------------------
=> Todays Tip on using EZGUI 4.0 (and 5.0)
=> Todays Tip on using EZGUI 5.0
=> Tips Feedback forum
=> EZGUI Source Code forum
-----------------------------
Computer Workshop Software User Forums
-----------------------------
=> Beginners Tutorials for EZGUI Pro/Personal
=> EZGUI Professional General Questions
=> EZGUI 5.0 Getting Started
=> EZGUI 5.0 Graphics
=> EZGUI 5.0 3D Graphics
=> EZGUI 5.0 Custom Control Design
=> EZGUI 5.0 Component Design
=> EZGUI 5.0 SuperClassing Design
=> EZGUI Extra - Linux, Handcoding, etc.
===> Wine Tested Commands
=> EZGUI Utility Dialog Designer
=> EZSprite
=> Other Software
-----------------------------
Programming
-----------------------------
=> PowerBasic for Windows (DDT and SDK)
=> Windows API
=> Source Code
=> Windows (and DDT) Tutorials
-----------------------------
Third Party Software
-----------------------------
=> Third Party Software
-----------------------------
Research and Development
-----------------------------
=> Touch User Interface Design
=> Windows 8 and Metro Application Development
=> EZGUI Update Discussion Forum
=> EZGUI 4.x fixes and wish list
=> EZGUI 5.0 wish list
-----------------------------
Customer Feedback
-----------------------------
=> Customer Feedback
=> Customer Surveys (Polls)
Loading...