flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: print issues FLEX-23252 and FLEX-13628 was [REQUEST] tutorial....
Date Fri, 14 Mar 2014 19:06:16 GMT
What does your renderer code look like?  If the height of the Label cannot be completely determined
from the explicitWidth of the renderer, then measuredHeight will not compute correctly.


From: Marcus Fritze <marcus.fritze@googlemail.com<mailto:marcus.fritze@googlemail.com>>
Reply-To: "dev@flex.apache.org<mailto:dev@flex.apache.org>" <dev@flex.apache.org<mailto:dev@flex.apache.org>>
Date: Friday, March 14, 2014 10:06 AM
To: "dev@flex.apache.org<mailto:dev@flex.apache.org>" <dev@flex.apache.org<mailto:dev@flex.apache.org>>
Subject: print issues FLEX-23252 and FLEX-13628 was [REQUEST] tutorial....

Thanks for your question.

I attached a image to https://issues.apache.org/jira/browse/FLEX-13628

In the AdvancedDataGridBaseEx.as Line 3056 the item.getExplicitOrMeasuredHeight() is every
time 20.

So when you look at my example image, the Label in the ItemRenderer has 2 lines. But the calculated
20 is only correct, when the Label has 1 line.

I really have no idea and of course not that experience in the "Flex internal functions",
but I think the setupRendererFromData function in the AdvancedDataGridBaseEx.as doesn't "create"
a correct ItemRenderer with the correct sizes. Especially when ItemRenderer has a Label with
variable multiline data.

In this setupRendererFromData function we set the explicitWidth for the ItemRenderer, but
it seems that the text-calculating of the Label (in the function createTextLinesFromTextBlock
Label.as 904) inside this ItemRenderer uses still the maxWidth = 10000 as innerWidth when
calculating the height.

I am also wondering that a lot of explicitHeight and measuredHeight values are NaN in and
after running the setupRendererFromData function. So maybe the ItemRenderer is not setup correctly?
Really, I have no clue.

Am 14.03.2014 um 17:25 schrieb Alex Harui <aharui@adobe.com<mailto:aharui@adobe.com>>:

What is wrong with the label height calculation?

On 3/14/14 9:17 AM, "Marcus Fritze" <marcus.fritze@googlemail.com<mailto:marcus.fritze@googlemail.com>>

Am 13.03.2014 um 20:40 schrieb Alex Harui <aharui@adobe.com<mailto:aharui@adobe.com>>:

And if you are using an IDE like IntelliJ or FB, then the easiest path
to use monkey-patching.  Create a test project, point the source-path to
include the modified AdvancedDataGridBaseEx.as and see if it works.

Thanks, this is working very good.

But, the problem with the AdvancedDataGridBaseEx.as seem to be a bigger
It seem that the height of the text in Label inside a ItemRenderer is not
calculated correct.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message