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())