About 3,400,000 results
Open links in new tab
  1. python - How to create a multiline entry with tkinter ... - Stack Overflow

    Mar 12, 2012 · You could use the Text widget: from tkinter import * root = Tk() text = Text(root) text.pack() root.mainloop() Or with scrolling bars using ScrolledText: from tkinter import * from tkinter.scrolledtext import ScrolledText root = Tk() ScrolledText(root).pack() root.mainloop()

  2. How to create a multiline entry with Tkinter? - GeeksforGeeks

    Mar 16, 2021 · Methods to create multiline entry with tkinter: Method 1: Using Tkinter Text Widget. A text widget provides a multi-line text area for the user. The text widget instance is created with the help of the text class. It is also used to display text lines and also allows editing the text. Syntax: Text( root, optional parameters, ... Example 1: Output:

  3. tkinter - Multiple line text entry box in python - Stack Overflow

    It is an old question but currently following is a very good method for scrollable multiline text entry: ScrolledText(mainwin, width=50, height=5).pack() Full program: from tkinter import * from tkinter.scrolledtext import ScrolledText mainwin = Tk() ScrolledText(mainwin, width=50, height=5).pack() mainwin.mainloop()

  4. How to Get the Input From Tkinter Text Box? - GeeksforGeeks

    Apr 1, 2025 · In Tkinter, the Text widget allows users to input multiple lines of text, making it perfect for scenarios where you need to collect large amounts of data, such as messages, notes or any other textual information.

  5. How to read the input (line by line) from a multiline Tkinter

    Mar 11, 2015 · From the document, the get method on tkinter.text will just return the string, including the new line \n. You can not treat the tkinter.text as file, but you can use other ways. Read them all and split them into a list.

  6. Python Tkinter - Text Widget - GeeksforGeeks

    Aug 21, 2024 · Text Widget is used where a user wants to insert multiline text fields. This widget can be used for a variety of applications where the multiline text is required such as messaging, sending information or displaying information and many other tasks. We can insert media files such as images and links also in the Textwidget.

  7. Python Tkinter GUI program for multi line text entery box by

    In above code you can two more lines inside the function. my_str1=t1.get("1.0",END) # read from one text box t1. t2.insert(tk.END, my_str1) # Add to another text box t2. t1.delete('1.0',END) # Delete from position 0 till end . t1.update() # update the delete.

  8. Tkinter Text Widget | MultiLine Input in Python - CodersLegacy

    One of these many widgets is the Tkinter Text Widget, which can be used to take multiline input. It also has a ton of amazing features that allow us to create complex GUI applications such as Notepad’s and Syntax Highlighters.

  9. 10. Text Widget in Tkinter | Tkinter | python-course.eu

    Feb 1, 2022 · We create a text widget by using the Text() method. We set the height to 2, i.e. two lines and the width to 30, i.e. 30 characters. We can apply the method insert() on the object T, which the Text() method had returned, to include text. We add two lines of text.

  10. Tkinter Entry Widget - Python Tutorial

    The Entry widget allows you to create a simple textbox with a single text line. To create a textbox, you use the following steps: First, import ttk module from tkinter: from tkinter import ttk Code language: JavaScript (javascript) Second, create the Entry widget’s constructor: entry = ttk.Entry(master, **kw) Code language: Python (python) In ...

Refresh