I don't know why part of code below doesn't work properly.
var button1 = new qx.ui.form.Button("First Button");
this.getRoot().add(button1, {left: 100, top: 100});
alert(button1.getBounds());
button1.getBounds() returns null
Karol
Sebastian Werner wrote:
>
> The position detection requires that the widget is visible and rendered.
>
> You can use:
>
> widget.getBounds() which returns a map of sizes and positions. The
> position is relative to the next parent.
>
> widget.getContainerLocation() returns a map with absolute coordinates
> from the left/top corner of the document. This is ideal for positioning
> popups etc to a specific widget.
>
> You may also be interested in the features of qx.util.PlaceUtil. It
> allows easy positioning of popups etc. to specific other target in the
> document. The mixin qx.ui.core.MPlacement is already included into some
> widgets like Popup and has some useful methods for these positioning
> tasks as well.
>
> Sebastian
>
>
>
> Grykar schrieb:
>> I would like to know in relation to the next parent.
>>
>> I suppouse if I know relation to the next parent I can find absolute
>> position in a few steps but if there is one step method to find it please
>> let me know.
>>
>> Karol
>>
>>
>> Sebastian Werner wrote:
>>> Do you mean absolute position to the document or in relation to the next
>>> parent?
>>>
>>> Sebastian
>>>
>>>
>>> Grykar schrieb:
>>>> Hi
>>>>
>>>> There is easy way to getLeft, getRight, getTop, getBottom in 0.7. How
>>>> to
>>>> do
>>>> the same in 0.8 ?
>>>>
>>>> Thanks,
>>>> Karol
>>>
>>> -------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>> challenge
>>> Build the coolest Linux based applications with Moblin SDK & win great
>>> prizes
>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>> world
>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>> _______________________________________________
>>> qooxdoo-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>
>>>
>>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
--
View this message in context:
http://www.nabble.com/How-to-get-position-of-widget-in-0.8--tp19435030p19436493.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel