python - Tkinter / ttk on Mac OS X Proper System Background Color (canvas) -


i set canvas background color same default system color frame above.

how can determine correct background color used other widgets in tkinter/ttk on mac os x? use fixed value prefer way. not sure if ttk way go on os x @ all.

this example tries background color frame , sets canvas different color frame (white instead of light grey).

from tkinter import * ttk import *  app = tk() s = style()  t = frame(app) t.pack()  b1 = button(t, text="y no right background color") b1.pack()  b2= button(t, text="y") b2.pack()  #bg = "green" #bg = "#eaeaea" bg = s.lookup("tbutton", "background") print bg  s.configure('tframe', background=bg) c = canvas(app, background=bg) c.pack()  mainloop() 


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -