Does anyone know if there is a way to change the picture icon of a tkmessage? I know there is a way to change the icon of the overall panel using tcl, but what about the message box? For example, can I change the 'Tk' icon to something else?
Thanks! DD
I don't see any options for changing the icon within a message box. The message box function is a pretty simple, few option tool for a quick message. If you want more functionality than it provides (ie the option to change that icon) then you can create your own dialog box with a label and button to do the job and change the icon the way with a regular window.
kico = 'myicon.ico' # where we have an icon we prefer to use instead of tkinter icon which icon files
from Tkinter import * root = Tk() root.wm_iconbitmap(kico) # this seems to overlay in the main application and all child window tkinter dialogs etc
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.