How to set Tcl/Tk “system configuration” items?

牧云@^-^@ 提交于 2020-01-06 06:33:07

问题


https://www.tcl.tk/man/tcl8.6/TkCmd/tk_mac.htm#M20 talks about a "System configuration parameter", which is supposed to modify toplevel background on Mac.

How should I set this parameter in Tkinter?

I tried tk_root.option_add("::tk::mac::useThemedToplevel", 1) but it seems to have no effect.


回答1:


I believe that was for MacOS, last released in 1999. When using the 'aqua' theme on Mac OS X, the theme colors can't be changed.

If you need to have a changeable color, use the older widgets, 'frame', 'label', etc. (I have no idea if that's possible in tkinter).




回答2:


Did you try

configuring the toplevel with “-background systemWindowHeaderBackground”

according to the link info?.

I'm a tcl'er so i can't help with that using tkinter. If doesn't works, you could take a look to these other links:

MacWindowStyle : a MacOS X command to create toplevel windows with a variety of appearances

Tk differences on Mac OS X: include some bugs.

(Or can search for more info about Mac in the tcl/tk wiki.)

I hope this help you,

Saludos!



来源:https://stackoverflow.com/questions/52464078/how-to-set-tcl-tk-system-configuration-items

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!