如何在iupLua中显示更改的标签图像?

时间:2013-03-24 08:09:01

标签: lua luabind

在更改标签的图像属性之后,但是图像不能显示。当我双击列表更改标签图像,但没有响应时,图像不显示。为什么呢?

require "iuplua"
require "iupluaim"
list = iup.list{"flag", "cut", "undo"; expand = "no"}
image = nil
box = nil
label = iup.label{active = "yes", visited = "true"}
function list:dblclick_cb(i, str)
    image = iup.LoadImage(str .. ".PNG")
    label.image = image
end
box = iup.vbox{list, label}
dlg = iup.dialog{box; title = "Lists", size = "400x100"}
dlg.show(dlg)
iup.MainLoop()

0 个答案:

没有答案