Look into where you’re going to call this function to create the main window. You have the following function which isn’t called anywhere in order to create your window: def elenco_completo() Return filter in (entry.surname + entry.forename).casefold() # Sort them in the table to match their relative order in self.data.įor index, entry in enumerate(entries_showing): New_filter = self.filter_var.get().casefold()Įntries_showing = Self.cur_filter = self.filter_var.get().casefold() Self.filter_var.trace("w", self.filter_changed) With open(self.csv_path, encoding="utf-8") as file:Įntry.iid = ("", "end", values=astuple(entry)) nfig(command=)įor i, heading in enumerate(columns, start=1): Self.table = ttk.Treeview(frame, selectmode="extended", show="headings", columns=columns, yscrollcommand=t, xscrollcommand=t) id(row=1, column=0, sticky="we")Ĭolumns = Xscrollbar = tk.Scrollbar(frame, orient="horizontal") Yscrollbar = tk.Scrollbar(frame, orient="vertical") Self.filter_entry.pack(side="left", fill="x") Self.filter_entry = tk.Entry(frame, textvariable=self.filter_var) Tk.Label(frame, text="Filter:").pack(side="left") How can I implement other functionalities described as above?įrom dataclasses import dataclass, astuple Puls_chiudi_elenco = Button(frm_infospiti, text="Chiudi", command=chiudi_elenco) Tree_colonne.heading('#3', text="Data di nascita") Tree_colonne.heading('#1', text="Cognome") Tree_colonne.insert("", END, values=)Įntry = Entry(frm_infospiti, width=25, borderwidth=4, textvariable=dato_da_cercare) Tree_colonne.insert("", 0, values=(cognome, nome, nascita)) With open('/path/to/file.csv', 'r', encoding='UTF-8') as elenco: Tree_colonne = ttk.Treeview(frm_infospiti, selectmode='extended', height=15) Tree_colonne.insert("", 0, values=(search_var))Ĭolonne = Trova_digit = dato_da_cercare.get().capitalize() Then, I would that during the search, the other infos in the list disappear temporary from the screen until I digit something else. I had wrote a function for searching names and various infos saved on a csv file.īasically it works, but it just bring up the result on the top of the treeview only if I wrote the whole name or else and not while I’m still typing on the keyboard.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |