("UPDATE cars_buying_checksonly SET checkdate=?, checkvalue=?, checknum=? WHERE uid=?", (self.buying_check_date_var.get(),self.buying_check_value_var.get(),self.buying_check_num_var. Self.checkid)) #is using self.rowid instead of self.checkid can help? Self.buying_check_date_var.get(), self.buying_check_value_var.get(),self.buying_check_num_var.get(), Self.buying_em(self.buying_selected_check_edit, values=( How to test the value of this expression: ( ()) 'values' 0 For example, I want to verify that the expression above is not empty or null, how shall I do it And what means 'values' 0 in this expression Thanks. Uid = self.buying_em(self.buying_selected_check_edit) 1 I use Python with Tkinter, and I have a treeview with several rows. Print(self.buying_em(self.buying_selected_check_edit)) Self.buying_selected_check_edit = self.buying_lection() #trying to select the row and edit it in treeview to update it in the database Self.checksrecords, self.checksrecords, self.checksrecords, self.checksrecords)) (self.checksrecords, self.checksrecords, self.checksrecords, self.checksrecords, "INSERT INTO cars_buying_checksonly (checkdate, checkvalue, checknum, carmake, Sellername, buyingdate, entirepaymentmethod, checkpic)values(?,?,?,?,?,?,?,?)", nn = nnect('car dealership.db ' )įor self.checksrecords in self.checksrecords: After updating the record, we will reset all the. #add treeview values into database trying to use the primry key as self.rowid As the user enters or updates the data, we will be using try except error handling to manage the data updating. Self.buying_check_num_var.get(), self.checkid,(),(),self.Buyingdate_var.get (),(),self.buying_nocheckpic))įor child in self.buying_checkspaymenttree.get_children(): Self.buying_check_date_var.get(), self.buying_check_value_var.get(), set(item, columnNone, valueNone) setchildren. Self.buying_checkspaymenttree.insert("", 'end ', values=( Ttk Treeview widget displays a hierarchical collection of items. This way you’ve built your own loop that updates Tkinter, like mainloop (), but that still. The first option is instead of mainloop (), put your querie in a while True loop with window.update () at the end. There are a couple ways to get around this. Each item has a textual label, an optional image, and an optional list of data values. When your script gets to mainloop () it stops there and won’t do anything else. Self.buying_checkspaymenttree = ("اdate", "اvalue", "checknum"اcheckid") The ttk.Treeview widget displays a hierarchical collection of items.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |