0

I am creating a library management system using tkinter and used pandas to read the data of books. I am wondering how will I be able to create a interactive table where a user can select a row and when they pressed a button I can make a command and do something with that row of data. Here is the dataframe I am working with:

                                              TITLE                   AUTHOR  PUBLICATION_DATE IDENTIFICATION_NO.  BOOK_ITEM       SUBJECT_CATEGORY
0                                                  NaN                      NaN               NaN                NaN        NaN                    NaN
1               Bar Review Materials in Commercial Law        Jorge V. Marivite            1998.0     001/Ge003/1998        5.0           Generalities
2                                   Rubdob ng Tag-Init             Nick Joaquin            2017.0     002/Ge004/2017        4.0           Generalities
3                                    A Research Primer      Consuelo G. Sevilla            1990.0     003/Ge005/1990        3.0           Generalities
4                                        Data Networks          Uyless D. Black            1989.0     004/Ge006/1989        2.0           Generalities
..                                                 ...                      ...               ...                ...        ...                    ...
505                                      World History        Gregorio F. Zaide            1994.0     962/Gh507/1994        2.0  Geography and History
506  Another Report About Magellan's Circumnavigati...        Fernando Oliveira            2002.0     963/Gh508/2002        2.0  Geography and History
507                                Journey to Majayjay  Paul P. de la Gironiece            1983.0     964/Gh509/1983        7.0  Geography and History
508                             The Malayan Connection          Zeus A. Salazar            1998.0     965/Gh510/1998        5.0  Geography and History
509  Jose Rizal: Life, Works and Writings of a Geni...        Gregorio F. Zaide            2014.0     966/Gh511/2014        3.0  Geography and History

and I am aiming a for something that looks like this example of table

Noahwaaa
  • 17
  • 5
  • 1
    You can make it so whenever one of the items of the listbox is selected, it invokes a dialog box that asks for the change and then on pressing enter it performs those changes in the listbox and the database. – typedecker Nov 18 '21 at 15:05
  • Does this answer your question? [How to make ttk.Treeview's rows editable?](https://stackoverflow.com/questions/18562123/how-to-make-ttk-treeviews-rows-editable) – itprorh66 Nov 18 '21 at 15:22
  • @itprorh66 That doesn't sound like what the OP wanted. They wanted to _run a command_, that does something with the selected row, when a button is selected. Please read questions thoroughly before flagging them a duplicates. – Sylvester Kruin Nov 18 '21 at 16:20

0 Answers0