views:

738

answers:

1

Hi community,

I have the following problem. I use a custom component for painting a graph on a canvas, now when the windows is resized I want to determine the actual width and height of my canvas to resize the graph as well, therefore I used the resize event I can use in mxml. Now I detected in my method for resizing I only receive the width and height of the canvas just before resizing not after. When grabbing an edge of my window and moving it slowly for resizing this does not matter but when maximizing or minimizing the windows, this plays a more important role. Can someone tell me the reason for that behaviour? What is the proper solution for that problem?

Thanks in advance

Sebastian

A: 

If you use the resize event, you should check the width and height of currentTarget property in the event.

bug-a-lot