In PAYG, that would be another bead.  Not all UI is dynamic and dynamic
support usually requires more code.  There is a LayoutChangeNotifier bead
that watches a value and dispatches an event that will cause re-layout in
layouts that are listening.

And you can subclass VerticalLayoutWithPaddingAndGap and bake the change
detection and re-layout into a new dynamic layout if you wish.

HTH,
-Alex

On 3/14/18, 9:04 AM, "[email protected] on behalf of Carlos Rovira"
<[email protected] on behalf of [email protected]> wrote:

>Hi
>
>I tried to change the gap of a vertical layout at runtime using a Slider
>that change gap value:
>
><fx:Script>
>        <![CDATA[
>private function onValueChange(event:Event):void
>{
>    vlg.gap = slider_gap.value;
>}
>    ]]>
>    </fx:Script>
>
>    <js:beads>
>        <js:VerticalLayoutWithPaddingAndGap id="vlg" gap="10"/>
>    </js:beads>
>
>    <j:Slider id="slider_gap" width="250" value="10" minimum="0" maximum=
>"100"
>                valueChange="onValueChange(event)"/>
>
>But this not work.
>
>Seems that layout once is set can't be changed, or there's no call of type
>"doLayout" or something like this after setup again the gap value. I tried
>to recall "layout()" method to see what happen but gives error
>
>TypeError: undefined is not an object (evaluating
>'this.host.getLayoutHost')
>
>Is out layout system not prepared to do this or there's a way to call a
>relayout in some way after set gap or padding in a layout class?
>
>thanks
>
>-- 
>Carlos Rovira
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2
>Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C417da01f8a18406d1b1a08d5
>89c5640e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636566403233451178&s
>data=L1izMcsHOvUc54KbxjBUL7OSUxSIE3oBDjviSFhbCs8%3D&reserved=0

Reply via email to