![]() But you can add a label and an entry for this purpose instead and you insert items names similarly to the the other Tkinter.Entry() entries. So I set a counter self.i to name the items. Here is how the application demo looks like: You can adapt my solution to your problem. I designed a simple interface to show you how to resolve this. You seem to be interested only in how to insert data the user types within Tkinter.Entry() widgets into ttk.Treeview() after a Tkinter.Button() click. Or is treeview the right widget for this or can someone suggest a widget suitable for this issue? thanks ![]() # Clears the Entry box, ready for another data entry. ![]() # Inserts data written in the entry box to the treeview widget when Enter button is pressed. Self.entry_btn = ttk.Button(self,text='Enter', command=self.insert_value) Self.entry_1.grid(row=1, column=2, columnspan=2, sticky='w') Self.entry_1 = ttk.Entry(self, width=100, textvariable=self.entry_val) Purchase_entry = ttk.Label(self, text='Purchase Entry:') Label = ttk.Label(self, text='Purchase Entry', font=LARGE_FONT2) Im new to python and tkinter and there is not much tuts about treeview. I want the items typed in the entry to be inserted to the treeview when the enter button is pressed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |