我是用斯图尔特(pygtk)制作指标集的,我的职能是寻找一个过程。 我需要菜单中的项目能够改变,同时继续管理文字。
菜单中的项目应根据它是否运行而杀人或启动。
此外,我希望在运作期间只改动一个文本的项目,但这一改动应不断改变,以显示案文档案中的最新一行。
我如何在不重新启用文字的情况下更新法典中的项目?
见以下编码:。
预 收
我是用斯图尔特(pygtk)制作指标集的,我的职能是寻找一个过程。 我需要菜单中的项目能够改变,同时继续管理文字。
菜单中的项目应根据它是否运行而杀人或启动。
此外,我希望在运作期间只改动一个文本的项目,但这一改动应不断改变,以显示案文档案中的最新一行。
我如何在不重新启用文字的情况下更新法典中的项目?
见以下编码:。
预 收
我现在谈谈这个问题。
You can use set_label() anytime, and since GTK main keeps looping over and over, you can use a code to update the label at a set time:
gobject.timeout_add(1000, self.funcion, None)
def function(self, widget)
self.label.set_label(uploadM)
请参看<代码>_label<>/code>方法gtk。 MenuItem
。 见here。
为了不点击该项目,你希望使用<代码>_ 敏感编码>方法gtk。 Widget
使植被不敏感。 见。
也可使用<代码>get_label方法>gtk。 MenuItem
,以检索在<代码>gtk中储存的任何文本。 MenuItem。
例如:
my_menu_item = gtk.MenuItem("Script is runnning")
my_menu_item.set_sensitive(False)
之后,在文字状况发生变化时:
my_menu_item.set_text("Script is not running")
Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...
I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...
Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...
Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...
I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...
Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...
Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...
I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...