I removed the text.style.position = "absolute" because it makes set to zero width in an edgepane. Added text.cols and text.rows since these field are available in textarea.
andySat 24 Sep 2011
Yeah I removed that as a hack cause it breaks the ability to stretch Text to fill panes like EdgePane.center and ConstraintPane.
Luckily though, I had to get back in there to make some other changes, and was able to come up with a design that supports both use cases. So multiline Text now works with both preferred size (using prefCols/prefRows) - and will fill bounds when given an explicit size (EdgePane, ContentPane, etc).
jessevdam Tue 23 Aug 2011
I changed the fwt with the following patch to fix this problem
diff --git a/src/fwt/js/TextPeer.js b/src/fwt/js/TextPeer.js --- a/src/fwt/js/TextPeer.js +++ b/src/fwt/js/TextPeer.js @@ -29,7 +29,8 @@ if (this.m_multiLine) { var text = document.createElement("textarea"); _ text.style.position = "absolute"; + text.cols = this.m_prefCols + text.rows = this.m_prefRows text.style.left = "0px"; text.style.top = "1px"; text.style.outline = "none";(note _ is -)
I removed the text.style.position = "absolute" because it makes set to zero width in an edgepane. Added text.cols and text.rows since these field are available in textarea.
andy Sat 24 Sep 2011
Yeah I removed that as a hack cause it breaks the ability to stretch Text to fill panes like EdgePane.center and ConstraintPane.
Luckily though, I had to get back in there to make some other changes, and was able to come up with a design that supports both use cases. So multiline Text now works with both preferred size (using prefCols/prefRows) - and will fill bounds when given an explicit size (EdgePane, ContentPane, etc).