Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 #2396 is a reply to message #2395] Tue, 11 April 2006 13:18 Go to previous message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
luzr wrote on Tue, 11 April 2006 09:13

fudadmin wrote on Mon, 10 April 2006 22:31

luzr wrote on Mon, 10 April 2006 08:22


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


I did it. Cool
Edit: P.S. Why is it fuzzy?



Well, see HOW it gets resized... It grows when you type characters in, but the size is limited by the size of "view".

However, when you get the text scrolled, size is defined just by the part after the "scrollpoint", so if you delete them, it gets smaller than it would need to be to show the whole text. Quite weird Wink

Mirek


I think it's more weird when Ultimate++ TreeCtrl doesn't have any editing capabilities... and users have to spend enormous amount of time searching for simple simple methods ... Wink

ok, this is a piece of code for it
Size NodeEditor::GetMinFitSize()  //todo: other fonts and displays
{
	Size sz = StdDisplay().GetStdSize(GetData());
	sz += Size(2 * 4, 2 * 3); //adding some margins...
	return sz;
}


BTW, it's possible to make the view to grow or grow Edit vertically, too.

[Updated on: Tue, 11 April 2006 16:20]

Report message to a moderator

 
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 May 14 08:10:29 CEST 2024

Total time taken to generate the page: 0.02694 seconds