简体   繁体   中英

WinXP button-style with wxPython

I noticed that my programs written with wxPython have Win98 button style. But Boa Constructor (that is written using wxPython too) got pretty buttons.

How to make buttons look like current Windows buttons style?

Are you packaging the app with py2exe?

If so you may need to specify a manifest file to make Python use the WinXP(Vista?) theme/Common Controls:

http://wiki.wxpython.org/DistributingYourApplication

扩展John的答案 ,您也可以为python.exepythonw.exe创建清单文件,以便在没有首先使用py2exe打包的情况下查看新样式。

The answers so far handle distributing the package as an executable (eg. py2exe), where the answer has already been given.

But since (i think) python 2.6 you have the same problem when just starting the .py file from the commandline (Vista and Windows7). Robin Dunn suggested using update_manifest.py which he distributes with wxPython and puts it in the same directory as python.exe.

After applying update_manifest.py using a copied version of python.exe wxPython apps have the correct themed look and yes it also works using windows7 RC1.

您是否尝试使用pythonw.exe而不是python.exe运行脚本?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM