![]() ![]() Self.poduzece_id(row=4, column=1, sticky='we') Tk.Label(self, text='poduzece:').grid(row=4, column=0) Self.ured_id(row=3, column=1, sticky='we') ![]() Tk.Label(self, text='ured:').grid(row=3, column=0) Self.prezime_id(row=2, column=1, sticky='we') Tk.Label(self, text='prezime:').grid(row=2, column=0) Self.ime_id(row=1, column=1, sticky='we') Self.cl_broj_id(row=0, column=1, sticky='we') Double-click on a row to edit it: from os.path import dirname, join Thank you again for response and hope you can help me, Probably because that my treeview wont automatically refresh? Print("EntryGuestForm view_guests_form reference:", view_guests_form)īut in terminal I see no connection between entry and view.pyĮntryGuestForm view_guests_form reference: NoneĮditGuestForm view_guests_form reference. Guset_id - is for selecting row by id number (that is only difference)ĭef _init_(self, parent, view_guests_form=None): ![]() Print("EditGuestForm view_guests_form reference:", view_guests_form) I have also edit.py and all is the same init with class EditGuestForm(tk.Toplevel):ĭef _init_(self, parent, guest_id=None, view_guests_form=None): Print("TreeView is refreshed with new entry Data.") # We call the 'load_data' method to refresh the data in treeview Print("The form has been cleared for a new entry.") Print("The data has been saved successfully.") I have in entry.py (entry form) this definition: # Save the entry to the database - Save Entry Hope it answers your question… and please my app is for Croatia so data in PostgreSQL and treeview are in Croatian language (eg. #('', tk.END, values=formatted_row)įormatted_row = self.format_eu_date(formatted_row)įor index in : # Index of columns to be formattedįormatted_row = self.format_eu_number(formatted_row) Mjesec, app, osoba, smjestaj, osig, sm_osig, bor_prist, hrana, ukupno, napomena SELECT id, cl_broj, ime, prezime, ured, poduzece, dolazak, odlazak, nocenja, a treeview connected to PostgreSQL but how are you doing that?.Thanks in advance for your answers and for response, first of all I apologize again about my bad terminology, newbie I am… treeview?Ĭan someone give me some advice or guidance? Is there anything else I need to show from the code? Obviously, I’m not connecting that about refreshing the data with the view.py file, i.e. Sorry if I’m using a little bad terminology, but I’m still learning! Which should refresh the data in the treeview after input. I use this method when clicking the Save button: self.view_guests_form.load_data() When I close the currently open treeview and reopen it, the data is then displayed. The second Input button opens the input form where the data is entered and after clicking the Save button, the data is successfully saved in PostgreSQL, but the problem is that I can’t understand why the newly entered data is not automatically refreshed in the treeview. One of the files is view.py, which displays a treeview connected to PostgreSQL when the Show button is clicked. I am making a small OOP programming application and have created several py files. That’s why sometimes I run into a problem that I just can’t figure out. I am relatively new to Python programming. ![]()
0 Comments
Leave a Reply. |