When no argument or a
nil
path value is provided, the tray icon will be removed.Window:loadtrayicon([path], [index]) method
Loads the window's tray icon, displayed in the notification area section of the taskbar.
Parameters
[path]
Represent any of the following possible icon locations :
[index]
The icon index, an optional number starting from 1, that represent the icon to select.
Return value
The method return a boolean value, indicating wether the operation succeeded or not.Example
local ui = require "ui"
-- create a window
local win = ui.Window("Window:loadtrayicon() sample", 320, 200)
-- load a tray icon, displayed in the notification area of the taskbar
win:loadtrayicon("resources\\ico\\main.ico")
win:show()
while win.visible do
ui.update()
end