Skip navigation
Currently Being Moderated

Getting actual dimensions of canvas after getting scrollbar

May 1, 2010 4:01 AM



hi have a application, where i have a <mx:Image> inside a canvas. Now when i scale the image, by using scaleX and scaleY properties, i get scrollbars. This means that the canvas area has grown. But when i query for width/height, it returns the same as it was before scrollbars. I have already tried validate methods. can some one help ?

  • Currently Being Moderated
    May 1, 2010 7:30 AM   in reply to rajdeeprath



    you could use the maxverticalscrollposition and the maxhorizontalscrollposition,


    fullheight = height+maxVerticalScrollPosition;


    this will be out by the width/height of the scroller which is usually 16 unless its a custom scroller. so


    fullheight = height+maxVerticalScrollPosition-16;

    fullwidth = width+maxHorizontalScrollPosition-16;




    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points