level 3
请问悬浮窗中的按钮text用什么命令修改?怎么试都不行。我想按钮点击一次后就显示别的文字。
var w = floaty.window(
<frame>
<button id="action" text="学生姓名" w="120" h="40"/>
</frame>
);
2020年06月09日 07点06分
1
level 9
另外,因为脚本运行的线程不是UI线程,而所有对控件的修改操作需要在UI线程执行,此时需要用ui.run,例如:
ui.run(function(){ w.text.setText("文本");});
2020年06月09日 08点06分
2
这样写了也不行才问的
2020年06月09日 08点06分
错误:TypeError:Cannot call method"setText" of undefined
2020年06月09日 08点06分