a couple of options: 1) change your login control to a popup titlewindow instead and use popupmanager to center it to the viewstack 2) put your login control in a <mx:Box> control that takes up the full size of the viewstack and has verticalAlign set to middle and horizontalAlign set to center.
Shaun --- In flexcoders@yahoogroups.com, "cardinalflexjeremy" <[EMAIL PROTECTED]> wrote: > > I have a viewstack, that contains two sub components. One (the first) > is simply a small login panel. (its actually just a canvas with text > fields and a header etc inside it). The second is what is shown once > the user is logged in; its also a large canvas, with a function app > inside that component. > > So my code looks like this: > > <mx:ViewStack width="800" height="600" maxHeight="600" maxWidth="800" > selectedChild="{getView(false)}" id="myViewStack"> > <view:LoggedInView id="LoggedInView" /> > <view:loginPanel id="LoginView" /> > > </mx:ViewStack> > > So I want to have the loginPanel displayed in the center of the > available real estate, regardless of screen real estate, (some viewers > might be 1024x 768 and some might be 800 x 600) is there anyway to > automatically center the loginPanel component in the parent view stack? > > Thanks > JS >