You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by chris_d_k <ck...@christiankiefer.de> on 2015/09/01 21:16:16 UTC

Re: Text position in an IconItemRenderer wrong at the first time the list is displayed in a view

Hi,

I have tried to set the width in this way:

var iRenderer:ClassFactory = new ClassFactory(MyItemRenderer);
 iRenderer.properties = {ownUser: quizUser, width: CONTENT_WIDTH};
 myList.itemRenderer = iRenderer;


and this doesn't work. It really seems like the one line texts sometimes are
measured as two-line-texts...

Any tip what more I can try?



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Text-position-in-an-IconItemRenderer-wrong-at-the-first-time-the-list-is-displayed-in-a-view-tp10743p11114.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Text position in an IconItemRenderer wrong at the first time the list is displayed in a view

Posted by Alex Harui <ah...@adobe.com>.
Can you make a really small test case?  If so, file a JIRA issue and
attach it.

-Alex

On 9/1/15, 3:43 PM, "chris_d_k" <ck...@christiankiefer.de> wrote:

>Some traces to the problem:
>
>in layout contents:
>
>
>trace("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
>trace(labelDisplay.text);
>trace("---");
>trace(labelDisplay.getPreferredBoundsHeight());
>trace(labelDisplay.getPreferredBoundsWidth());
>trace("---");
>trace(this.getPreferredBoundsHeight());
>trace(this.getExplicitOrMeasuredWidth());
>
>=
>
>[trace] xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>[trace] Du hast gegen Liliana Löwenherz 3:3 unentschieden gespielt.
>[trace] ---
>[trace] 108.15
>[trace] 339
>[trace] ---
>[trace] 120
>[trace] 509
>
>[trace] xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>[trace] Du hast gegen Liliana Löwenherz 3:3 unentschieden gespielt.
>[trace] ---
>[trace] 66.15
>[trace] 740
>[trace] ---
>[trace] 120
>[trace] 910
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/Text-position-in-an-IconIte
>mRenderer-wrong-at-the-first-time-the-list-is-displayed-in-a-view-tp10743p
>11116.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.


Re: Text position in an IconItemRenderer wrong at the first time the list is displayed in a view

Posted by chris_d_k <ck...@christiankiefer.de>.
Some traces to the problem:

in layout contents:


trace("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
trace(labelDisplay.text);
trace("---");
trace(labelDisplay.getPreferredBoundsHeight());
trace(labelDisplay.getPreferredBoundsWidth());
trace("---");
trace(this.getPreferredBoundsHeight());
trace(this.getExplicitOrMeasuredWidth());

=

[trace] xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[trace] Du hast gegen Liliana Löwenherz 3:3 unentschieden gespielt.
[trace] ---
[trace] 108.15
[trace] 339
[trace] ---
[trace] 120
[trace] 509

[trace] xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[trace] Du hast gegen Liliana Löwenherz 3:3 unentschieden gespielt.
[trace] ---
[trace] 66.15
[trace] 740
[trace] ---
[trace] 120
[trace] 910



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Text-position-in-an-IconItemRenderer-wrong-at-the-first-time-the-list-is-displayed-in-a-view-tp10743p11116.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Text position in an IconItemRenderer wrong at the first time the list is displayed in a view

Posted by chris_d_k <ck...@christiankiefer.de>.
When I trace the widths of the renderer and the label the first time it is to
short - what would be the best way to set the width of an itemRender in a
mobile app?  It's width should be 100% - a gap left and right defined in
css...



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Text-position-in-an-IconItemRenderer-wrong-at-the-first-time-the-list-is-displayed-in-a-view-tp10743p11115.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.