SBrickConfigureDialog.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:sbrick-controller 作者: wintersandroid 项目源码 文件源码
def create_channel_box(self, channel_number):
        hbox = Gtk.FlowBox()
        hbox.set_max_children_per_line(8)
        hbox.set_min_children_per_line(8)
        hbox.set_selection_mode(Gtk.SelectionMode.NONE)

        hbox.add(Gtk.Label("Channel: %d" % channel_number))

        hbox.add(Gtk.Label("ID:"))
        id_edit = Gtk.Entry()
        id_edit.set_max_length(5)
        hbox.add(id_edit)

        hbox.add(Gtk.Label("Name:"))
        name_edit = Gtk.Entry()
        name_edit.set_max_length(20)
        hbox.add(name_edit)
        hbox.add(Gtk.Label("Type:"))
        combo_type = Gtk.ComboBoxText()
        combo_type.set_id_column(0)
        combo_type.set_model(self.channelTypeStore)
        renderer_text = Gtk.CellRendererText()
        combo_type.clear()
        combo_type.pack_start(renderer_text, True)
        combo_type.add_attribute(renderer_text, "text", 1)
        hbox.add(combo_type)

        self.content.pack_start(hbox, False, True, 0)
        return id_edit, name_edit, combo_type
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号