![]() ![]() ("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=( Uid = self.buying_em(self.buying_selected_check_edit) 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: #add treeview values into database trying to use the primry key as self.rowid Self.buying_check_num_var.get(), self.checkid,(),(),self.Buyingdate_var.get (),(),self.buying_nocheckpic))įor child in self.buying_checkspaymenttree.get_children(): You can also pass a tuple of tags like tags. em (iid, tags'red') changes the tags of iid to ('red',). em (iid, 'tags') returns the list of tags of the item identified by iid. Self.buying_check_date_var.get(), self.buying_check_value_var.get(), The documentation on Treeview ( here for instance) says that there is a method called item that can be used to set or retrieve the options of a tree item. Self.buying_checkspaymenttree.insert("", 'end ', values=( ![]() for child in treeview.getchildren(): em(x, option'values')4 The code above is to select it, but I want to change the value of '5' in let's say '10'. The treeview has 6 columns and I want to change the value of let's say the 5th column. From your question, I understand that you have some separate process that generates data and you want to periodically update the treeview content with the new data. Self.buying_checkspaymenttree = ("اdate", "اvalue", "checknum"اcheckid") Let's say I wanted to change a value of a cell in a specific row of my treeview. for item in tree.getchildren(): em(item, text'new text', values(.)) tree.getchildren() returns the children of the item ('' for the root of the tree).![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |