MyTetra Share
Делитесь знаниями!
Обработчик из (1)
Время создания: 08.05.2017 22:22
Раздел: Python - PyGTK - classes - gtk - ComboBox
Запись: xintrea/mytetra_db_mcold/master/base/1494271344dsvy1wex7o/text.html на raw.githubusercontent.com
name_combo.connect("changed", self.on_name_combo_changed)
def on_name_combo_changed(self, combo):
"""
Function for work with combo
:param combo: control ComboBox
:return:
"""
tree_iter = combo.get_active_iter()
if tree_iter != None:
model = combo.get_model()
row_id
, name = model[tree_iter][:2]
print("Selected: ID=%d, name=%s" % (row_id, name))
else:
entry = combo.get_child()
print("Entered: %s" % entry.get_text())
 
MyTetra Share v.0.58
Яндекс индекс цитирования