⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bin.py

📁 使用Pygtk写的几个例子
💻 PY
字号:
# A simple gtk.Conatiner subclassing example reimplementing gtk.Bin in pythonimport gtkclass Bin(gtk.Container):    __gtype_name__ = 'PyGtkBin'    def __init__(self):        gtk.Container.__init__(self)        self.child = None    def do_add(self, child):        child.set_parent(self)        self.child = child    def do_remove(self, child):        widget_was_visible = child.flags() & gtk.VISIBLE        child.unparent()        self.child = None        if widget_was_visible:            self.queue_resize()    def do_forall(self, internal, callback, data):        if self.child:            callback(self.child, data)label = gtk.Label()c = Bin()c.add(label)print c.get_children()c.remove(label)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -