Skip to content

Conversation

@gmertes
Copy link

@gmertes gmertes commented Oct 20, 2023

Adds the icon parameter to all exported functions. This allows the user to overwrite the default Tk window icon.

icon takes a bitmap in the standard forms accepted by Tk (primitives 'info', 'warning', 'question' etc), an icon file (ico, xbm) or any valid Tk PhotoImage file (png, gif, ppm/pgm).

Compatibility is maintained with the Windows native functions. On Windows, only system icons are available and are accessed using the Tk bitmap primitives 'info', 'warning', 'stop', and 'question'. If an image file is specified on Windows, the icon will be empty.

Examples:

from pymsgbox import *
alert(text='test', title='test', icon='icon.ico')

image

alert(text='test', title='test', icon='question')

image

Windows native:

alert(text='test', title='test', icon='question')

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant