El lun, 16 ene 2023 a las 12:37, AI 7 (<asadimran...@gmail.com>) 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@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
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to