How Scroller crop a display object ?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How Scroller crop a display object ?

pol2095
Hello,

a Scroller in flex use scrollRect, mask or other ?

Thanks



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: How Scroller crop a display object ?

Alex Harui-2
Pretty sure it uses scrollRect.

On 1/31/19, 12:54 PM, "pol2095" <[hidden email]> wrote:

    Hello,
   
    a Scroller in flex use scrollRect, mask or other ?
   
    Thanks
   
   
   
    --
    Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-flex-users.2333346.n4.nabble.com%2F&amp;data=02%7C01%7Caharui%40adobe.com%7Ca4966e944e1e447fe75408d687be4b5c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636845648711039454&amp;sdata=oyIPiiyXgVB%2FTfC3%2BNiNEX1PO7sQMRX9vH5BzuwpACM%3D&amp;reserved=0
   

Reply | Threaded
Open this post in threaded view
|

Re: How Scroller crop a display object ?

After24
In reply to this post by pol2095
Hi,

Yes, it's the layout class that uses the scrollRect property to set the
visible part of the viewport.

Vincent.
 



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: How Scroller crop a display object ?

pol2095
This post was updated on .
scrollRect has a one-frame delay before you can read back its effect on
widht/height, how validateNow() work or I understand that it's necessary to use callLater()  ?



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: How Scroller crop a display object ?

Alex Harui-2
IIRC, no Spark code ever "reads back" the size of display object.  The scrollRect's width/height is computed from other properties.  I think Flex in general rarely reads back the display object's size if at all since that value can contain stuff that isn't desired.  I do recall a one-frame wait on MX TextArea to update its scrollbars, but I don't think there were too many others if any.

Also, in case it helps, in general, MX components used masks and Spark components used scrollRects.

HTH,
-Alex

On 2/1/19, 5:00 AM, "pol2095" <[hidden email]> wrote:

    scrollRect has a one-frame delay before you can read back its effect on
    widht/height, how validateNow() work ?
   
   
   
    --
    Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-flex-users.2333346.n4.nabble.com%2F&amp;data=02%7C01%7Caharui%40adobe.com%7C6449e5b8a95d47b53b0908d688453522%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636846228178679680&amp;sdata=pluuRCRFRnyvz52jU9B9IjEd%2F5p4vWMNKL%2BgJuRQmRk%3D&amp;reserved=0