Web Analytics Made Easy - Statcounter
Skip to content

Only for Qt and Wx ports. Use psgtray package for the tkinter port

SystemTray

A System Tray

SystemTray(
    menu = None,
    filename = None,
    data = None,
    data_base64 = None,
    tooltip = None
)

Parameter Descriptions

Name Type Default Description
data bytes None in-ram image for icon (same as data_base64 parm)
data_base64 bytes None base-64 data for icon
filename str None filename for icon
menu List[List[List[str] or str]] None Menu definition. Example - ['UNUSED', ['My', 'Simple', '---', 'Menu', 'Exit']]
tooltip str None tooltip string

Class Properties

This class has no public properties

Class Methods

 def close
 def hide
 def read
 def show_message
 def timer_timeout
 def un_hide
 def update

close

Close the system tray window

close()

hide

Hides the icon

hide()

read

Reads the context menu

read(
    timeout = None
)

Parameter Descriptions

Name Type Default Description
timeout None Optional. Any value other than None indicates a non-blocking read

show_message

Shows a balloon above icon in system tray

show_message(
    title,
    message,
    filename = None,
    data = None,
    data_base64 = None,
    messageicon = None,
    time = 10000
)

Parameter Descriptions

Name Type Default Description
data b'' None Optional in-ram icon
data_base64 b'' None Optional base64 icon
filename str None Optional icon filename
message str Message to be displayed
messageicon None
time int or (int, int) 10000 Amount of time to display message in milliseconds. If tuple, first item is fade in/out duration
title str Title shown in balloon
RETURN Any The event that happened during the display such as user clicked on message

timer_timeout

timer_timeout(
    event
)

un_hide

Restores a previously hidden icon

un_hide()

update

Updates the menu, tooltip or icon

update(
    menu = None,
    tooltip = None,
    filename = None,
    data = None,
    data_base64 = None
)

Parameter Descriptions

Name Type Default Description
data ??? None icon raw image
data_base64 ??? None icon base 64 image
filename ??? None icon filename
menu ??? None menu defintion
tooltip ??? None string representing tooltip