Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在用 Python 为 Ubuntu 编写一个小的应用程序指示器。我需要更改不敏感(已禁用)的 gtk.MenuItem 的文本。我知道这个功能的一个活生生的例子,内置蓝牙指示器中的最上面的项目。
是一个容器,通常将gtk.MenuItem实际标签作为其子小部件,除非涉及更复杂的图像,例如图像;如果孩子只是一个简单的标签,你应该可以做到
gtk.MenuItem
menuitem.get_child().set_text('New text')