Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Text bgstipple on Mac

17 views
Skip to first unread message

aivar....@gmail.com

unread,
Jul 17, 2018, 7:01:50 AM7/17/18
to
Hi!

Is Text tags' bstipple attribute supposed to work on Mac?

I have problem getting it to work via Tkinter. Following script shows dithered background on Windows and Linux (Tk 8.6) but on Mac (both with Tk 8.5 via Python 3.6 and Tk 8.6 via Python 3.7) the background and foreground remain solid. Is this Tk limitation, Tkinter problem or am I missing something?

###############################

import tkinter as tk

root = tk.Tk()
text = tk.Text(root)
text.grid()

text.insert("1.0", """first
second
third
""")

text.tag_configure("bgstip", bgstipple="gray50", background="pink")
text.tag_configure("fgstip", fgstipple="gray50", foreground="blue")
text.tag_add("bgstip", "2.0", "3.2")
text.tag_add("fgstip", "3.0", "3.5")

root.mainloop()

###############################

best regards,
Aivar

Brad Lanam

unread,
Jul 17, 2018, 8:26:48 AM7/17/18
to
Yes, that is a limitation of Tk on Mac OS X.
Stipples are not supported.
0 new messages