Anchoring the Panels in SDK 1.0

27 views
Skip to first unread message

arunt...@gmail.com

unread,
Aug 3, 2011, 5:15:30 AM8/3/11
to mozilla-la...@googlegroups.com
Hello all,

I have been working with the Addon SDK 1.0. I have a panel which I would like to anchor to the bottom right of the window. But all I could find in the documentation was this:
[ anchor : handle ]

A handle to a DOM node in a page to which the panel should appear to be anchored. If not given, the panel is centered inside the most recent browser window. Note that it is not currently possible to anchor panels in this way using only the high level APIs.

Can someone explain how exactly can I do it in order to anchor it to the right bottom.
 
--
Regards
P.Arunmozhi
Twitter: @tecoholic

Jeff Griffiths

unread,
Aug 3, 2011, 10:29:39 AM8/3/11
to mozilla-la...@googlegroups.com

You need to instead create your panel, then assign it to the panel
property of the Widget:

[ panel : Panel ]

An optional panel to open when the user clicks on the widget.
Note: If you also register a "click" listener, it will be
called instead of the panel being opened. However, you can show
the panel from the listener by calling this.panel.show().

See this SOF comment for an example:

http://stackoverflow.com/questions/6728074/panel-positioning-with-the-firefox-add-on-sdk/6904046#6904046

Reply all
Reply to author
Forward
0 new messages