Hi,

In the application I am developing I have to open a fair amount of windows.
Since I do not want the windows to open by default on the top-left corner I
added this.addListener("resize", this.center, this) to the creator of the
windows.
The problem with this approach is that whenever the user later resizes the
windows
they get centered, of course, which is NOT the behavior I want. I would
rather that
the window centered after it is opened (or better yet, centered in the x
axis and 
not far from the top on the y axis). 

One way I found which works for at least one window, is to use
addListenerOnce
instead of addListener. The problem with this is that I have to nest three
of them
so that after all the initial size changes of the window it will be
centered. Of course
this is suboptimal and not general enough (I don't know if sometime I will
need four,
or if after two it will stop and the next time a user resizes the window it
will be
centered again).

Is there a smart way to achieve what I want without resorting to such hacks?

Thanks!
Omri

--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/New-window-placement-tp7314259p7314259.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to