Re: Pack labels
Alejandro Autalan <[email protected]> Mon, 16 Jan 2023 14:10:06 -0300
| Newsgroups | gmane.comp.python.tkinter |
|---|---|
| Message-ID | <CAMicNw2u6LMnGKh3FfR_bkJ8dnqRE6Jd_SJ+4XWq-5VbdSxncg@mail.gmail.com> |
--===============7535438149073615558== Content-Type: multipart/alternative; boundary="00000000000041c46d05f264a8c6" --00000000000041c46d05f264a8c6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable El lun, 16 ene 2023 a las 12:37, AI 7 (<[email protected]>) escribi=C3= =B3: > 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 label= s > are created which then go below the screen and are unreadable. There is n= o > 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 > [email protected] > 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.h= tml Or if you just want to display the lines, use a treeview with connected scrollbars. Regards --00000000000041c46d05f264a8c6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"lt= r" class=3D"gmail_attr">El lun, 16 ene 2023 a las 12:37, AI 7 (<<a href= =3D"mailto:[email protected]">[email protected]</a>>) escribi= =C3=B3:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px = 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi, I am= creating a booking system where one of the functions is to retrieve bookin= gs from a text file and display to the user. The text file stores =C2=A0eac= h booking on a new line with all its fields. A loop is made through the arr= ay when the text file is read and each line (each index of the array) creat= es a label with the text being the line and packs this label. When there ar= e many records stored in the text file, as many labels are created which th= en go below the screen and are unreadable. There is no scroll bar to view t= he labels below the screen or the ability to zoom out. Can anyone guide me = on how to fix this? _______________________________________________<br> Tkinter-discuss mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">Tkinter-dis= [email protected]</a><br> <a href=3D"https://mail.python.org/mailman/listinfo/tkinter-discuss" rel=3D= "noreferrer" target=3D"_blank">https://mail.python.org/mailman/listinfo/tki= nter-discuss</a><br></blockquote><div><br></div><div>Hello.=C2=A0 You need = a ScrolledFrame. One alternative is <a href=3D"https://ttkwidgets.readthedo= cs.io/en/latest/examples/frames/ScrolledFrame.html">https://ttkwidgets.read= thedocs.io/en/latest/examples/frames/ScrolledFrame.html</a></div><div>Or if= you just want to display the lines, use a treeview with connected scrollba= rs.</div><div><br></div><div>Regards<br></div></div></div></div> --00000000000041c46d05f264a8c6-- --===============7535438149073615558== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Tkinter-discuss mailing list [email protected] https://mail.python.org/mailman/listinfo/tkinter-discuss --===============7535438149073615558==--