U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » RichText,QTF,RTF... » how to get Text Size from controls like EditString?
Re: how to get Text Size from controls like EditString? [message #2373 is a reply to message #2372] Mon, 10 April 2006 09:22 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
fudadmin wrote on Sun, 09 April 2006 21:55

luzr wrote on Sun, 09 April 2006 14:55


...
Draw::GetTextSize?

Mirek


1. How to use it? (Same difficulty as Image resize... Smile )

2. I've found more...
Size sz1 = 	ScreenInfo().GetTextSize("text size test",font);
Size sz2 = 	StdDisplay().GetStdSize(editvalue);


but they require recalculations EditString...

3. Actually, it would be good to have EditField::AutoSize(true) or similar...



1. Not at all - quite minimal interface IMHO (to get the text size, you have to know the text and the font, do not you).

OK, that ScreenInfo() is unnecessary and current refactoring will remove that...

2. Beware, StdDisplay().GetStdSize does not do exactly the same thing!

3. Ok, that would solve that, would not it? Wink I am sorry, not until now I have seen that that F2 feature in IE resizes editfield.... BTW, it is pretty fuzzy bussines....

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Is LineEdit the main normal text edit control? +DocEdit [SOLVED...]
Next Topic: Scrollable log window with colour text
Goto Forum:
  


Current Time: Tue Jun 23 10:34:55 GMT+2 2026

Total time taken to generate the page: 0.00464 seconds