LuaRT
LuaRT copied to clipboard
`Panel:onKey()` and `Tab:onKey()` events are not documented
Panel and Tab widgets supports onKey() event but it's not documented
PanelandTabwidgets supportsonKey()event but it's not documented
Are you sure about that? I tried the onKey event, but it doesn't work.
code:
local ui = require "ui"
local win = ui.Window("test", 320, 200)
Tab = ui.Tab(win, {"1", "1"}, 100, 100, 100, 100)
Tab:center()
function Tab:onKey(key)
win:status("Pressed Key : "..key)
end
win:show()
while win.visible do
ui.update()
end
local ui = require "ui"
local win = ui.Window("test", 320, 200)
Panel = ui.Panel(win, 100, 100, 100, 100)
Panel:center()
function Panel:onKey(key)
win:status("Pressed Key : "..key)
end
win:show()
while win.visible do
ui.update()
end
There is an issue with this. Panel:onKey() is fixed for next LuaRT release, but I will remove the Tab:onKey() event as it won't work as expected