Well I have such a method for QxWindow. But it works only if the width
and height of the QxWindow is not set to auto:
QxWindow.prototype.centerToBrowser = function() {
var d = window.application.getClientWindow().getClientDocument();
this.setLeft(d.getClientWidth()/2-this.getWidth()/2);
this.setTop(d.getClientHeight()/2-this.getHeight()/2);
}
My original Idea was to have a value 'center' or 'middle' for the left
and top attribute so the queue can calculate the correct values at
rendering time.
More accurate we would have a centerTop and centerLeft attribute which
are settable to 'center'.
But this would of course require additional implementation efforts in
the rendering queue.
For now I'm using the above.
Oliver Vogel schrieb:
@sebastian
i am often using a Qxwindow "inside" a "normal" - Browser window.
the best way to position such a window is in the middle of the
"document" of the "normal" window (i hope you can understand, what i
mean)
so my question:
what about a centerToParent() or better centerToBrowserWIndow()
function which centers the QxWindow in the middle of the
Browser-Deocument?
Olli
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
--
Mit freundlichen Grüßen
Dietrich Streifert
Visionet GmbH
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel