[Mono-bugs] [Bug 540730] New: SomeTextView.SizeThatFits always returns 0, 0.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Sep 21 11:42:06 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=540730
Summary: SomeTextView.SizeThatFits always returns 0,0.
Classification: Mono
Product: MonoTouch
Version: unspecified
Platform: Other
OS/Version: Mac OS X 10.5
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Class Libraries
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: Tom1234 at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Hey there,
I've been trying to use SizeThatFits but I just can't seem to get it to return
me a size. I got an UITextView called SomeTextView and i got loads of text in
the view pasted via the Interface Builder. So now the text is in the TextView
and I want to resize my TextView to fit the amount of text.
In ObjC this is done by:
[SomeTextView sizeThatFits:SomeTextView.bounds]
And in Monotouch I've been try to do the same with this code:
SizeF textviewsize = new SizeF();
textviewsize = SomeTextView.SizeThatFits(SomeTextView.Bounds.Size);
SomeTextView.ContentSize = new SizeF(320, textviewsize.Height);
All it returns is 0,0 while it should have returned a size that fits the text
in the "SomeTextView".
Also, I've tried using ContentSize instead of Bounds.Size. But still with no
result.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list