Hi Charles, Thanks. I finally get it to work. I didn't get it at first since I thought I have to use the scrollbars on the outer Canvas, as opposed to the inner Canvas.
Besides this, you will have to set the percentage width and height both to 100% for the inner Canvas to get it work right. Just in case someone else is interested. Cheers, geng --- In flexcoders@yahoogroups.com, Charles Parcell <pokemonkil...@...> wrote: > > This is dumb, I know, but put your Canvas (with the scrollbars) inside > another Canvas and apply the background to the parent Canvas so that it > never has to deal with scrollbar scaling. And set the child Canvas > background to transparent. > > Charles P. > > > On Thu, May 7, 2009 at 4:54 PM, gwangdesign <gwangdes...@...> wrote: > > > > > > > Hi, > > > > I am trying to get the scrollbar for a container (can be either a Canvas or > > VBox) "inside" my background image. Basically my Canvas has a background > > image which I set background-size to "100%". Flex scales the background > > image to fit the whole component when there is no scroll bar. But when the > > scroll bar appears, the image "shrinks" to allow space for the scroll bar. > > > > So say if the Canvas has a width of 200 px, the background image has a > > width of 200 px when there is no scrollbar. If the scrollbar is 16 pixels > > wide, the background image would become 200 - 16 = 184 px, as opposed to > > staying 200px. > > > > I think I can get around this by using nested containers. Just to want to > > make sure that I am not missing anything obvious. > > > > Thanks. > > > > > > >