Feb-01-2021, 09:39 PM
(Feb-01-2021, 03:04 PM)deanhystad Wrote: I think it would be very useful if you could post what it is you are seeing. I still don't know what the query is returning. Because I don't know what is returned it is difficult to say why it is not getting added to the combobox.Here you go...
cur.execute("SELECT distinct addr FROM ticket WHERE cust = ?" , (self.cboCust.get(),))
self.cboAddr.delete(0, END)
data = []
for row in cur.fetchall():
data.append(row[0])
>>>>>>> self.cboAddr.insert(END, (row))
print(row[0])
return data
conn.commit()
conn.close()
self.cboCust['values'] = (fill_custbox())
>>>>> #self.cboCust.bind('<<ComboboxSelected>>', fill_addrbox)
>>>>> #self.cboAddr['values'] = (fill_addrbox())
Combo Box: abababablklklk
Debug Window: abababab
lklklk
for row in cur.fetchall():
data.append(row[0])
>>>>> #self.cboAddr.insert(END, (row))
print(row[0])
return data
self.cboCust['values'] = (fill_custbox())
>>>>> self.cboCust.bind('<<ComboboxSelected>>', fill_addrbox)
>>>>> self.cboAddr['values'] = (fill_addrbox())
Combo Box: nothing, empty, nada
Debug Window: abababab
lklklk
abababab
lklklk