Ok, i found a solution, but would like to know more about it.
If I do this :
(this.parent as FloorPlan).invalidateDisplayList();
(this.parent as FloorPlan).validateNow();
It doesn't work, but if I do this :
(this.parent as FloorPlan).validateDisplayList();
It works.
???
What actually happens is that I'm drawing in a container that is a child
of FloorPlan (a Canvas). Then I have to set the width and height of the
container manually because I'm drawing in the graphics (is there a way
to tell the Container to adjust its size to the graphics???).
Then I call (this.parent as FloorPlan).validateDisplayList() to make
things work.
Why are the first two lines not working?
Lieven Cardoen
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Lieven Cardoen
Sent: vrijdag 19 januari 2007 7:25
To: [email protected]
Subject: RE: [flexcoders] Canvas ScrollBars problems...
Please, I need this to be able to continue... It's really annoying me
and I tried like everything, except waiting a few frames...
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Lieven Cardoen
Sent: donderdag 18 januari 2007 21:48
To: [email protected]
Subject: RE: [flexcoders] Canvas ScrollBars problems...
Nobody a clue???
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Lieven Cardoen
Sent: donderdag 18 januari 2007 18:17
To: [email protected]
Subject: [flexcoders] Canvas ScrollBars problems...
I have a component wich extends Canvas (FloorPlan). I add a component
extending Container to this Canvas.
Now, in this Container, I draw a lot of things and I set the width and
height myself so the Canvas show ScrollBars where needed.
The problem now is following :
If I redraw something and reset the width and height of the Container,
strange things start to happen when previously the horizontal scrollbar
for instance was at its maximum.
If I click the horizontal scrollbar, somehow the Canvas changes its
scrollbars to correctly.
I tried all of these, and nothing seems to work.
In the Container :
//paints things and sets width and
height of Container
this.paint();
this.validateNow();
this.validateDisplayList();
this.validateSize()
this.validateNow();
(this.parent as FloorPlan).validateNow();
(this.parent as FloorPlan).validateDisplayList();
(this.parent as FloorPlan).validateSize();
(this.parent as FloorPlan).validateNow();
Lieven Cardoen
Application developer
indiegroup
interactive digital experience
engelse wandeling 2 k18
b8500 kortrijk