From asadimran220 at gmail.com Sun Jan 15 15:49:00 2023 From: asadimran220 at gmail.com (AI 7) Date: Sun, 15 Jan 2023 20:49:00 +0000 Subject: [Tkinter-discuss] Pack labels Message-ID: Hi, I am creating a booking system where one of the functions is to retrieve bookings from a text file and display to the user. The text file stores each booking on a new line with all its fields. A loop is made through the array when the text file is read and each line (each index of the array) creates a label with the text being the line and packs this label. When there are many records stored in the text file, as many labels are created which then go below the screen and are unreadable. There is no scroll bar to view the labels below the screen or the ability to zoom out. Can anyone guide me on how to fix this? -------------- next part -------------- An HTML attachment was scrubbed... URL: From alejandroautalan at gmail.com Mon Jan 16 12:10:06 2023 From: alejandroautalan at gmail.com (Alejandro Autalan) Date: Mon, 16 Jan 2023 14:10:06 -0300 Subject: [Tkinter-discuss] Pack labels In-Reply-To: References: Message-ID: El lun, 16 ene 2023 a las 12:37, AI 7 () escribi?: > Hi, I am creating a booking system where one of the functions is to > retrieve bookings from a text file and display to the user. The text file > stores each booking on a new line with all its fields. A loop is made > through the array when the text file is read and each line (each index of > the array) creates a label with the text being the line and packs this > label. When there are many records stored in the text file, as many labels > are created which then go below the screen and are unreadable. There is no > scroll bar to view the labels below the screen or the ability to zoom out. > Can anyone guide me on how to fix this? > _______________________________________________ > Tkinter-discuss mailing list > Tkinter-discuss at python.org > https://mail.python.org/mailman/listinfo/tkinter-discuss > Hello. You need a ScrolledFrame. One alternative is https://ttkwidgets.readthedocs.io/en/latest/examples/frames/ScrolledFrame.html Or if you just want to display the lines, use a treeview with connected scrollbars. Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: