LuaRT applications uses by default the current Windows theme.
Setting this property will force the use of another theme.
Setting this property will force the use of another theme.
ui.theme read/write property
Get or set the current application color theme, as a string
value :
"dark"
: uses the Windows dark theme for the application"light"
: uses the Windows light theme for the application
Example
local ui = require "ui"
local win = ui.Window("ui.theme example", 320, 200)
win:center()
local button = ui.Button(win, ui.systheme)
button:center()
function button:onClick()
ui.theme = ui.theme == "dark" and "light" or "dark"
button.text = ui.theme
end
ui.run(win):wait()