Hi Barry,

Popup positioning is relative to the popup parent dispayObject.  If you want to center your popoup, you can change the parent from the itemRenderer to a different displayObject.  You would still open the popup from the itemRenderer, but attach it too a higher level parent.

       public var popUpWindow:IFlexDisplayObject;
       public var popUpParent:DisplayObject;

       popUpParent = Application.application.mainCanvas;

       popUpWindow = PopUpManager.createPopUp(popUpParent,myPopUpView,true);

       PopUpManager.centerPopUp(popUpWindow);

HTH - TH

--- In [email protected], "barry.beattie" <[EMAIL PROTECTED]> wrote:
>
> using the livedocs example
> http://livedocs.macromedia.com/flex/2/langref/mx/containers/TitleWindow.html
>
> the titleWindow's x and y values surprisiongly seem to do sod-all...
> <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
> title="Title Window" x="600" y="300">
>
> positioning seems to be driven by the parent/opener...
>
> "Number that specifies the component's vertical position, in pixels,
> within its parent container."
>
> my "parent" (itemRenderer) is in a different position, depending on
> which row is selected....
>
> Surely I can set an absolute screen position or, failing that, using
> the (parent's parent) dataGrid's position? localToGlobal() is still
> getting the (changing) parent's position, it seems...
>
>
> any suggestions? thanx
>
>
> --- In [email protected], "Barry Beattie" barry.beattie@
> wrote:
> >
> > Hi all
> >
> > I've been trying everything I can think of to get a modal titleWindow
> > pop-up to centre on the screen:
> >
> > if the itemRenderer button that opens it is at the top of the browser,
> > part of the titleWindow is out of reach, but is OK if it's opened from
> > further down the (parent) datagrid.
> >
> > I'm after positioning to be exactly the center of the screen no matter
> > which button called it. is this set by the title window's properties?
> > or the opener (parent)?
> >
> > Also, I'm a bit surprised that the parent can set some styles of the
> > titleWindow but not others, even though what I've read says it
> > should...
> >
> >
> > these work being set by the parent:
> >
> > helpWindow.title="Please Enter Login Information";
> > helpWindow.setStyle("borderAlpha", 0.9);
> >
> > these don't
> >
> > // from
> > http://www.jessewarden.com/archives/2006/01/changing_the_mo.html
> > helpWindow.setSize(320, 240);
> > helpWindow.setActualSize(320, 480);
> > helpWindow.setStyle("modalTransparency", 99);
> > helpWindow.setStyle("modalTransparencyColor",0x660000);
> >
> > any suggestions?
> >
> > thanx
> > barry.b
> >
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to