Re-measure the custom item renderer

I am writing to an Adobe Air client about a service similar to Twitter.

On the timeline (list component) I have a specialized rendering of elements, which is basically a Canvas with a fixed width of Image and Text, which is multi-line.

If the text is long enough to change the height of the canvas, it will be changed only if I manually change the width of the window, forcing me to redraw all the renderers. If I just look through the list, all the “new” renderers will have a minimum height (that is, the height of the image).

Any ideas on how to get the renderer to be re-measured when I set its data?

Thanks in advance!:)

+3
source share
6 answers

try calling invalidateSize () in itemrender and / or invalidateDisplayList () in the list

0
source

I am struggling with similar invalidation / resizing issues. This video shed light on creating custom components for me. Hope this helps.

Here is a link to a great video of a medical engineer talking about creating components for flex in an Action script.

http://tv.adobe.com/watch/max-2008-develop/creating-new-components-in-flex-3-by-deepa-subramaniam/

0
source

variableRowHeight=true ?

0

updateComplete, . , , updateComplete itemrenderer, .

0

variableRowHeight true;
itemRenderer verticalScrollPolicy (, ) . 100%.

Flex4, VBox root itemRenderer, , VBox / VGroup Canvas.

0
0
source

Source: https://habr.com/ru/post/1706544/


All Articles