Hi,

the focus call on a window widget instance has no effect to set a window 
active (blue title bar). The window API has a property for that, here an 
example:
popup.addListener("disappear", function(e){
window.setActive(true);
button1.focus();
});

This should do what you are expect.

Cheers,
Chris

Am 22.05.2010 19:03, schrieb rsantiagopaz:
> Hi. I have this little problem controlling the focus between windows and
> popups.
> Try this example.
> When click on "Close popup" button, why the focus return to "Show popup"
> button, but not the window?
> Really, the focus return to window, but the window's title bar remains
> white, not blue. When click with the mouse, then the title bar set blue.
> This is a little bug, or I am doing wrong something?.
> Thanks
>
>
> var doc = this.getRoot();
>
> var window = new qx.ui.window.Window().set({width: 200, height: 200});
> window.setLayout(new qx.ui.layout.Basic());
> window.addListenerOnce("appear", function(e){
>       window.center();
> });
>
> var button1 = new qx.ui.form.Button("Show popup");
> button1.addListener("execute", function(e){
>       var popup = new qx.ui.popup.Popup(new qx.ui.layout.Basic()).set({width:
> 150, height: 100});
>       popup.addListener("appear", function(e){
>               button2.focus();
>       });
>       popup.addListener("disappear", function(e){
>               window.focus();
>               button1.focus();
>       });
>       var button2 = new qx.ui.form.Button("Close popup");
>       button2.addListener("execute", function(e){
>               popup.destroy();
>       });
>       popup.add(button2, {left: 20, top: 20});
>       popup.placeToWidget(button1);
>       popup.show();
> });
> window.add(button1, {left: 30, top: 30});
> var textfield = new qx.ui.form.TextField();
> window.add(textfield, {left: 30, top: 60});
> doc.add(window);
> window.open();
>    

------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to