When no argument or a
nil path value is provided, the Window icon will be removed.Window:loadicon([path], [index])method
Loads the window icon, displayed at the top left corner and on 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
--! luart-extensions
import ui
-- create a window
local win = ui.Window("Window:loadicon() sample", 320, 200)
-- load a window icon
win:loadicon("resources\\ico\\main.ico")
win:show()
while win.visible do
ui.update()
end