1

後でラベルの画像属性を変更すると、画像が表示されません。リストをダブルクリックしてラベル画像を変更しても、応答がなく、画像が表示されません。なんで?

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()
4

0 に答える 0