Browse Source

Added parameter for window icon

pyinstaller
Holger Frey 7 years ago
parent
commit
71504d4af7
  1. 11
      arduino_timetable/gui.py

11
arduino_timetable/gui.py

@ -375,7 +375,11 @@ class Application(tk.Frame): @@ -375,7 +375,11 @@ class Application(tk.Frame):
self._master.destroy()
def run_application(available_commands, title='Arduino Scheduled Commands'):
def run_application(
available_commands,
title='Arduino Scheduled Commands',
icon=None
):
''' run the gui application
available_commands:
@ -383,11 +387,16 @@ def run_application(available_commands, title='Arduino Scheduled Commands'): @@ -383,11 +387,16 @@ def run_application(available_commands, title='Arduino Scheduled Commands'):
title:
window title bar text
icon:
program icon to use
'''
# create the Tkinter root and instantiate the application
root = tk.Tk()
root.wm_title(title)
if icon is not None:
root.iconbitmap(icon)
app = Application(master=root, available_commands=available_commands)
# use app.quit() as callback if the window is closed (with the 'X' button)

Loading…
Cancel
Save