Hi, thanks for helping! Actually the canvas contains the component's instance and so the component shouldn't need to know anything about the canvas.
I solved the issue with setting explicitWidth and explicitHeight of the component at change. It made the canvas update automatically. Before that I tried with setting .width and .height and it didn't work. Still having the feeling I don't get something right, but I guess another read of the corresponding help files would be enough to make things clearer. Thank you again and thanks to Manish for pointing me in the right direction! --- In [email protected], "Michael Schmalle" <[EMAIL PROTECTED]> wrote: > > Hi, > > Sounds to me from what you have explained, you have not called > setActualSize() on the canvas instance in your custom component;s > updateDisplayList() method. > > Did you ? > > IE > > canvas.setActualSize(canvas.getExplicitOrMeasuredWidth(), > canvas.getExplicitOrMeasuredHeight()) > > Peace, Mike > > On 4/22/07, Manish Jethani <[EMAIL PROTECTED]> wrote: > > > > Is the size of the UIComponent really changing? Is > > invalidateDisplayList() getting called on the Canvas internally? If > > not, try calling it explicitly and your Canvas should show scrollbars. > > > > On 4/21/07, vitcheff <[EMAIL PROTECTED] <vitcheff%40gradina.net>> > > wrote: > > > Hi everyone, > > > I have following problem: > > > > > > Created a custom component by extending UIComponent using AS3. > > > > > > Added a Canvas to the Application container and then added an instance > > > of that custom component. > > > > > > What the component does is load an image in a Loader instance and > > > scales it down to fit into the canvas. However there is a slider that > > > allows the image to be scaled back up and get larger than the canvas. > > > At that moment I try to make the canvas scrollable without success. > > > > > > Canvas.clipContent is set to true; > > > > > > measure() is overridden in the component implementation to set > > > measuredWidth and measuredheight to the width and height of the loaded > > > image. > > > > > > invalidateSize() is also called when the image changes its size. > > > > > > Any help greatly appreciated! > > > Thanks! > > > > > > > > > > > > -- > > > Flexcoders Mailing List > > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > > Search Archives: > > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > -- > Teoti Graphix > http://www.teotigraphix.com > > Blog - Flex2Components > http://www.flex2components.com > > You can find more by solving the problem then by 'asking the question'. >

