Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

Just popping in
Just popping in
Posts: 7
Joined: Mon Jul 31, 2006 15:47


Postby bitten » Mon Oct 09, 2006 18:45

How I make to discover how many lines the one text multiLineEditbox goes to have given its size x and y?


User avatar
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Tue Oct 10, 2006 10:09

the Font class has members to calculate text extents.

getHorzExtent and getFormattedHorzExtent and getFormattedLineCount IIRC. Better check the API ref...

0.5 gives you access to getFormattedLines as well which you could then just do a size() call on the know the number of lines. HTH

Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests