[英]add gtk.widget in a gnome Applet
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. 我写了一个小侏儒小程序,当我们单击一个按钮时,我想在“ gnome-panel”下添加一个gtk.widget,就像时钟小程序的日历一样。
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. 使用此代码,当我单击按钮时,该列表将显示在gnome面板中:这是因为我将其添加到mainLayout中。
So how do I add it under the "gnome-panel". 因此,如何在“ gnome-panel”下添加它。
Thanks 谢谢
您必须创建一个gtk.Window
,将其gtk.Window
在applet下,然后在其中添加它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.