如何在 IupAnimatedLabel 中显示圆形进度条 IUP_CircleProgressAnimation

以下是最小的工作代码:

require("iuplua")
require( "iupluacontrols" )
require("iupluaimglib")

label_1 = iup.label {title = "这是标签"}
label_2 = iup.label {image = "IUP_ActionOk"}

-- 以下代码不工作
--label_3 = iup.AnimatedLabel(NULL);
--iup.SetAttribute(label, "ANIMATION", "IUP_CircleProgressAnimation");
--iup.SetAttribute(label, "START", "Yes");

vbox = iup.vbox{
                 label_1
                ,label_2
                --, label_3
}

dlg = iup.dialog{
  vbox
}

dlg:showxy(iup.CENTER,iup.CENTER)
dlg.usersize = nil

-- 为了能够在其他上下文中运行此脚本
if (iup.MainLoopLevel()==0) then
  iup.MainLoop()
  iup.Close()
end

该示例摘自帮助文档,但不幸的是,被注释的部分不起作用。

点赞
用户1898478
用户1898478

使用以下代码:

label_3 = iup.animatedlabel {}
label_3.animation =“IUP_CircleProgressAnimation”
label_3.start =“Yes”

刚测试了一下,你的示例可行。

2018-02-19 19:45:56