1

Label and Editor not visible in black ground in Mac OS, enter image description here

Code

from tkinter import *
def main():
root = Tk()
root.geometry('500x500')
num = StringVar()
l1=Label(root,text='strike',highlightbackground="Yellow", fg="Blue", highlightthickness=30)
t1 = Entry(root,textvariable=num, highlightbackground="Yellow", fg="Blue", highlightthickness=30)
btn=Button(root, text='Click Me', bd='50',command = startorder, highlightbackground="Yellow", fg="Blue", highlightthickness=30)

l1.grid(row=0,column=0)
t1.grid(row=0,column=1)
btn.grid(row=1,column=0)
root.mainloop()
6
  • 1
    I tried many options available in internet. but cant change the bgcolor. I know button got issue but what about Label and Texteditor? Python 3 Commented Jan 20, 2022 at 7:28
  • 1
    Why main function has no indent. Commented Jan 20, 2022 at 7:32
  • 1
    And where you call the main function. Commented Jan 20, 2022 at 7:32
  • I don't personally use mac, but searching this up there seems to be a lot of issues running tkinter on it, specifically regarding colour adjustment as noted in this post. You might want to refer to this module to see if it helps at all, sorry i can't test it myself. Commented Jan 20, 2022 at 20:14
  • I just copied the code snippet. not the entire program. I was struggling to post this in stackflow hence no indent Commented Jan 21, 2022 at 8:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.