Skip to content

Instantly share code, notes, and snippets.

@Leon0824
Last active August 3, 2017 04:27
Show Gist options
  • Save Leon0824/78aea25434c8db2f0ba3c16d4f38506a to your computer and use it in GitHub Desktop.
Save Leon0824/78aea25434c8db2f0ba3c16d4f38506a to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
'''
ZetCode wxPython tutorial
This example shows a simple message box.
author: Jan Bodnar
website: www.zetcode.com
last modified: October 2011
'''
import wx
class Example(wx.Frame):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.init_ui()
def init_ui(self):
# wx.FutureCall(5000, self.show_message)
wx.CallLater(5000, self.show_message)
self.SetSize((300, 200))
self.SetTitle('Message box')
self.Centre()
self.Show(True)
def show_message(self):
wx.MessageBox('Download completed', 'Info', wx.OK | wx.ICON_INFORMATION)
def main():
ex = wx.App()
Example(None)
ex.MainLoop()
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment