Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
611 views
in Technique[技术] by (71.8m points)

icon (.ico) is not showing in Python

Does anyone know why the icon (.ico) picture is not showing? When I right click it, it appears to be pointing to the right file though.

enter image description here

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Q : "Does anyone know why the icon (.ico) picture is not showing? "

I can confirm to have routinely used the .iconbitmap()-method on cross-platform portable GUI-system for Linux / Win ecosystems years ago.

@DapperDuck hypothesis seems to be hard-coded right into the __doc__-string:

>>> print root.iconbitmap.__doc__
Set bitmap for the iconified widget to BITMAP. Return
        the bitmap if None is given.

        Under Windows, the DEFAULT parameter can be used to set the icon
        for the widget and any descendents that don't have an icon set
        explicitly.  DEFAULT can be the relative path to a .ico file
        (example: root.iconbitmap(default='myicon.ico') ).  See Tk
        documentation for more information.

So the Mac-specific documentation is to be consulted.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...