Home > Net >  Text in Entry widget going out of view
Text in Entry widget going out of view

Time:08-01

I have an entry widget as such:

...

entry1=Entry(frame1,font=("Verdana",10),width=20)
entry1.grid(row=0,column=0,rowspan=2,pady=10,padx=10,ipday=5)

and when I type a long string within in,
it crops out the last letter such that I can't even bring it into view using the right arrow key
enter image description here
(12039201901--71230110)

but if I add one more character then I can use the right arrow key to bring it into view

How do I fix this issue?

CodePudding user response:

Just change the width by 0.2 or 0.3 so it fits? If that doesn't work I'm not sure how to help.

CodePudding user response:

Tkinter Entry widget doesnt support text wrapping, as an alternative you can try using Text widget which also allows input and text wrapping. https://tkdocs.com/tutorial/morewidgets.html#text

Can also try

entry1=Entry(frame1,font=("Verdana",10),width=20, columnspan= 2)

So entry widget spans to next column as well.

  • Related