python - Sqlite records and kivy buttons -


im trying display records database buttons in kivy.

but when click on them text (row[3]) text last record. want each button have own name.

conn = sqlite3.connect('database.db') c = conn.cursor() row in c.execute('select * table'):     row = button(text=row[3])     button.bind(on_press=self.display)     layout.add_widget(button)   def display(self,*args):     print row.text 

did try with:

print self.text

also can change button's text

display(self,*args): print self.text self.text='clicked!' 

Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -