Sure, I simplified it to two files and tested, they exhibit the same behavior:
/ScratchWorkspace.mxml (launcher): http://actionscript.pastebin.com/m337640f0 /view/MyTitleWindow.mxml (demonstrates problem): http://actionscript.pastebin.com/m44e43c8e I am accessing the borderMetrics property from within the TitleWindow component, so it doesn't seem likely that I'm accessing the application's unless you can see something I'm doing wrong that is non-obvious to me. Thanks, Erik On 10/2/07, Alex Harui <[EMAIL PROTECTED]> wrote: > > Please post some relevant code. Are you sure you're picking up the > TW's metrics and not the application's? > > ------------------------------ > *From:* [email protected] [mailto:flexcompone > [EMAIL PROTECTED] *On Behalf Of *Erik Price > *Sent:* Tuesday, October 02, 2007 12:42 PM > *To:* [email protected] > *Subject:* [flexcomponents] TitleWindow borderMetrics properties do not > appear to reflect actual borders > > Hi, > > I have a TitleWindow-based component with which I am listening for the > FlexEvent.CREATION_COMPLETE event. The Flex 2 API doc has this to say > about CREATION_COMPLETE: > > "Dispatched when the component has finished its construction, property > processing, measuring, layout, and drawing." > > The problem is that at this time, my component's "borderMetrics" > property has a value of 0 for each of its properties -- top, right, > bottom, and left. However, when the component appears in the UI, it > clearly has a 3-pixel border (that I specified in the component's MXML > using "borderThicknessTop", "borderThicknessRight", etc) and not to > mention the standard title bar that appears for all TitleWindows. > > I would have assumed that the widths and heights of these borders, and > the title bar header, would be reflected in the TitleWindow's > borderMetrics property, but they are not*. Can anyone explain why > this is? > > Thanks, > > Erik > > * I have verified that they are not being drawn in some futuree frame > *after* CREATION_COMPLETE by putting in a simple click event listener > and checking after the window has completed drawing itself. The > TitleWindow.borderMetrics's properties are still all zero. > > >
