views:

30

answers:

1

Hi,

I have a question :

I write a little gnome applet, and when we click on a button i want to add a gtk.widget under the "gnome-panel" like the calendar of the clock-applet.

But I don't know how to do this. It's my code :

listButton = gtk.Button(_("lastest"))
self.listTwitt = gtk.TreeView()
mainLayout = gtk.VBox()
mainLayout.pack_start(listButton)
mainLayout.pack_start(self.listTwitt)
self.applet.add(mainLayout)

With this code, when i click on the button, the list shows up in the gnome panel : it's because I add it in the mainLayout.

So how do I add it under the "gnome-panel".

Thanks

A: 

You have to create a gtk.Window, position it under the applet, and add it in there.

ptomato
And how to position this window? After all, the applet might be at the top or the bottom of the screen, and maybe even at the sides.
Denilson Sá
A panel applet is a widget too, so you can get its size and position.
ptomato