Python Forum

Full Version: Text widget -macOS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When inserting results from a database into a text widget in MacOs, I get unwanted spaces between paragraphs.
However this behaviour doesn´t occur in Windows.

How to solve this issue ?

Thanks in advance

This is my relevant code

Quote:< e10 = tkscrolled.ScrolledText (root, height=12, width=60, font=(‘times new roman’, 9), wrap=“word”)
canvas.create_window(255, 295, window=e10)
………
cursor.execute(“SELECT * FROM relator” )
result = cursor.fetchall()
e10.delete(1.0, tk.END)
e10.insert(1.0, result[result.index(n)][9]) >
I´ve solved the issue, copying the result from database to a text file and from that text file to tkinter text widget.
This procedure cleans all spaces between paragraphs, as expected.