Reputation: 67
By default the entry box in Tkinter is only one row tall, is it possible to have a larger text box?
Example
text_write = ttk.Entry(mainframe, width=50, textvariable=(text_to_write))
This will give you a text box that is 50 wide but only 1 row tall, is it possible to make the text box taller?
Upvotes: 2
Views: 16204
Reputation: 82889
The Entry
widget is really just for one-line entries. For larger text boxes, use the Text
widget. This gives you a large, multi-line, text-wrapping text box. For scrollable text boxes, it is easier to use the ScrolledText
widget.
from tkinter.scrolledtext import ScrolledText
self.textfield = ScrolledText.ScrolledText(self, wrap=Tkinter.WORD)
Upvotes: 8