Thanks, Roman. Actually you answered my another question: I have been
trying to figure out why I cannot focus in the edit control inside the
titlewindow :) Where did you learn those good tips about relatedObject ?!!

I am still a little puzzled by how focusIn works. I realized I have to
do these two lines before the focusIn/OutHandler gets invoked: 

this.addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
this.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);

Does it mean by default, TitleWindow doesn't get FOCUS events
dispatched to?

Thanks again for your great help!

Tim

--- In flexcoders@yahoogroups.com, "Roman Protsiuk"
<[EMAIL PROTECTED]> wrote:
>
> Overloading focusOutHandler/focusInHandler helps. You'll be able to
handle
> FocusEvents there.
> Like in
> 
> 
> protected override function focusOutHandler(event : FocusEvent) : void {
>     if (event.relatedObject == null || !contains(event.relatedObject)) {
>         // event came from "outside" not from one of the children
>     }
>     super.focusOutHandler(event);
> }
> 
> R.
> 
> On 2/2/07, zhongtie <[EMAIL PROTECTED]> wrote:
> >
> >   I pop up TitleWindows using PopupManager, and I change the titlebar
> > colors based on if the titleWindow is active (topmost) or not. The
> > problem is, I am NOT able to capture the focus event for TitleWindow
> > (other controls, like TextArea, has no problems), nor does
> > onFocusIn/onFocusOut overwrite work.
> >
> > Any idea?
> >
> >  
> >
>


Reply via email to