iup "creation only"的时刻
iup[lua]中某些属性限定了"creation only"。
经测试,"creation only"在map前(map_cb前)即可(无需在如iup.dialog{}、iup.text{}调用时)。
local iup=require'iuplua'
local Method='before map'
-- and 'after map'
local Text=iup.text{
map_cb=function(Text)
if Method=='after map' then
Text.BORDER='YES'
Text.SPIN='YES'
end
end,
}
if Method=='before map' then
Text.BORDER='YES'
Text.SPIN='YES'
end
local Dialog=iup.dialog{
SIZE='100x',
Text,
map_cb=function(Dialog)
if Method=='after map' then
Dialog.MINBOX='NO'
Dialog.MAXBOX='NO'
end
end,
}
if Method=='before map' then
Dialog.MINBOX='NO'
Dialog.MAXBOX='NO'
end
iup.Show(Dialog)
iup.MainLoop()
浙公网安备 33010602011771号