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
SBrickConfigureDialog.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录