Python Forum
delete specific row of entries
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
delete specific row of entries
#1
I have a program i've been developing for a week. Basically it's a workout tracker app. You have the option of adding columns of entries,optionmenus and labels in order to add your workout activity, duration and date of activity. Adding columns of widgets helps the user write multiple data at the same time for ease of use. My problem is with trying to delete a column of widgets. im using forget() function and popping the lists of the widgets. I would like to change that last feature(of deleting the last column of widgets) to delete a specific column of widgets. So there will be a "Remove Entry" button for each column that is generated and pressing the specific remove entry button, the program would delete that corresponding column and not the last one as it is now. Can anyone help?
Reply
#2
Maybe you should use a treeview instead of trying to make your own table.

https://www.pythontutorial.net/tkinter/t...-treeview/
Reply
#3
(Feb-13-2024, 05:54 PM)deanhystad Wrote: Maybe you should use a treeview instead of trying to make your own table.

https://www.pythontutorial.net/tkinter/t...-treeview/

thanks. not sure if i understand it. but i need optionmenus to save date and activity type. as i understand it i cant have a list of options to be chosen by the user through treeview so i have to stick with the lists .. right?


quick edit:
the way i see it is when i load the add_column function it appends to the list the widgets and the button. what i would need is a way to get the index count of the remove entry button that was pressed so i can delete that corresponding entry. is there a way to detect the index of the specific remove entry button pressed?
Reply
#4
Maybe you should think about using a better GUI toolkit. I use Qt, but I think (from many opintions posed in this forum) that every GUI package for Python is better than tkinter.

I'm kind of curious about why you think you need to delete columns in your table. I don't see how removing columns fits in with the work you've been doing on this project. It makes sense to add/remove columns in a spreadsheet, but once you create a table, the columns are firmly decided.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pymysql delete specific rows in tableview stsxbel 2 1,095 Aug-18-2022, 09:50 AM
Last Post: ibreeden
  Trying to delete rows above a specific datetime value cubangt 19 11,538 May-09-2022, 08:57 PM
Last Post: deanhystad
Question [SOLVED] Delete specific characters from string lines EnfantNicolas 4 2,238 Oct-21-2021, 11:28 AM
Last Post: EnfantNicolas
  Delete specific lines contain specific words mannyi 2 4,148 Nov-04-2019, 04:50 PM
Last Post: mannyi

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020