Hey,
how about something like this:

var w = new qx.ui.core.Widget().set({
  width: 300,
  height: 300,
  backgroundColor: "red"
});
this.getRoot().add(w, {left: 10, top: 10});

var p = new qx.ui.popup.Popup();
p.set({width: 100, height: 60});
this.getRoot().add(p);

// calculation
var l = w.getLayoutProperties().left + (w.getWidth() / 2) - (p.getWidth() /
2);
var t = w.getLayoutProperties().top + (w.getHeight() / 2) - (p.getHeight() /
2);

p.placeToPoint({left: l, top: t});
​p.setVisibility("visible");​​​​​​

Regards,
Martin
-- 
View this message in context: 
http://n2.nabble.com/Center-a-popup-over-a-widget-tp4925313p4925456.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to