Sprites will always stretch their contents when you set their width
and height. That's just how Sprites work. StageScaleMode.NO_SCALE has
nothing to do with it.
You should put the Tree into something that doesn't stretch. Maybe
fl.core.UIComponent or a layout container.
- Josh
On Fri, Sep 5, 2008 at 3:58 AM, jonasnys <jonasnys@...> wrote:
> Hi!
>
> When I put a Astra tree directly in a BorderPane it works - the
> StageScaleMode.NO_SCALE does it's job:
>
> // Astra Xml Tree...
> xmlTree = new Tree();
> xmlTree.dataProvider = new TreeDataProvider( initXml );
> xmlTree.width = 200;
> xmlTree.height = 400;
>
> // ...put into BorderPane. Works! Rescales correctly
> {target: this.xmlTree , constraint: BorderConstraints.LEFT},
>
> But when I wrap the Astra tree into a Sprite, and put that sprite into
> the border pane, the tree is rescaled (the StageScaleMode.NO_SCALE
> "doesn't work" any more)...
>
> // Astra Xml Tree...
> xmlTree = new Tree();
> xmlTree.dataProvider = new TreeDataProvider( initXml );
> xmlTree.width = 200;
> xmlTree.height = 400;
>
> // ...put into a Sprite wrapper...
> xmlTreeWrapper = new Sprite();
> xmlTreeWrapper.addChild(xmlTree);
>
> // ...wich is put into the BorderPane. Doesn't work, rescales uglily!
> {target: this.xmlTreeWrapper, constraint: BorderConstraints.LEFT},
>
> Any idea how to solve this?
>
> Regards / Jonas
>
>