本文整理汇总了Python中gtk.WRAP_CHAR属性的典型用法代码示例。如果您正苦于以下问题:Python gtk.WRAP_CHAR属性的具体用法?Python gtk.WRAP_CHAR怎么用?Python gtk.WRAP_CHAR使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类gtk
的用法示例。
在下文中一共展示了gtk.WRAP_CHAR属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _start_shell
# 需要导入模块: import gtk [as 别名]
# 或者: from gtk import WRAP_CHAR [as 别名]
def _start_shell(self, dummy_button):
if self.shell_window is not None:
self.shell_window.present()
return
self.shell_window = gtk.Window()
self.shell_window.set_size_request(750,550)
self.shell_window.set_resizable(True)
scrolled_window = gtk.ScrolledWindow()
scrolled_window.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC)
ipython = ipython_view.IPythonView()
ipython.modify_font(pango.FontDescription(SHELL_FONT))
ipython.set_wrap_mode(gtk.WRAP_CHAR)
ipython.show()
scrolled_window.add(ipython)
scrolled_window.show()
self.shell_window.add(scrolled_window)
self.shell_window.show()
self.shell_window.connect('destroy', self._on_shell_window_destroy)
self._update_ipython_selected_node()
__IPYTHON__.user_ns['viz'] = self
示例2: _start_shell
# 需要导入模块: import gtk [as 别名]
# 或者: from gtk import WRAP_CHAR [as 别名]
def _start_shell(self, dummy_button):
if self.shell_window is not None:
self.shell_window.present()
return
self.shell_window = gtk.Window()
self.shell_window.set_size_request(750,550)
self.shell_window.set_resizable(True)
scrolled_window = gtk.ScrolledWindow()
scrolled_window.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC)
self.ipython = ipython_view.IPythonView()
self.ipython.modify_font(pango.FontDescription(SHELL_FONT))
self.ipython.set_wrap_mode(gtk.WRAP_CHAR)
self.ipython.show()
scrolled_window.add(self.ipython)
scrolled_window.show()
self.shell_window.add(scrolled_window)
self.shell_window.show()
self.shell_window.connect('destroy', self._on_shell_window_destroy)
self._update_ipython_selected_node()
self.ipython.updateNamespace({'viz': self})