Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Text widget -macOS
#1
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]) >
Reply
#2
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python installation for old MacOS Yonix 1 572 Sep-21-2023, 03:32 PM
Last Post: menator01
Lightbulb MacOS can't make it Archi 1 1,292 May-29-2022, 07:38 AM
Last Post: Larz60+
  Installing Python3 on MacOS using brew zazas321 5 5,401 May-28-2021, 06:19 AM
Last Post: perfringo
  can't open excel with my macos dcc 0 2,438 Oct-30-2019, 04:18 AM
Last Post: dcc
  pymysql on macos seirra tony1812 5 4,670 Sep-17-2017, 03:24 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020