S
S
Someone01102021-09-07 15:34:40
Python
Someone0110, 2021-09-07 15:34:40

How to remove empty line in Text Tkinter?

Hello, how can I remove an empty line in a Tkinter Text widget?

from tkinter import *

root = Tk()
data = Text(root, fg = "green")
data.pack()
root.mainloop()

For example, if I hold down the left mouse button in the Text widget and drag it from left to right, will an "empty" line be selected? The question is how to delete it using the data.delete() method?
These methods do not help: data.delete("1.0", END)
data.delete(1.0, "end-1c)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-09-07
@Vindicar

And if the initial coordinates are set to 0.0?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question