通过提交按钮生成进度条。想要为时间生成进度条(假设 1 分钟)。意味着用户应该看到 0 到 100% 的功能 1 分钟
Generates progress bars bysubmitbutton. Want to generate a progressbar for time (Assume 1 min).means user should see 0 to 100% feature for 1 min
我想为时间生成一个 progressbar
(假设 1 分钟)。表示用户应该看到 0
到 100%
功能 1 分钟。
isc.DynamicForm.create({
ID:"DynamicForm51",
autoDraw:false,
})
var importSection = isc.DynamicForm.create({
ID:"DynamicForm42",
autoDraw:false,
numCols:2,
width:950,
items:[
{
name:"ImportSection",
titleAlign:"center",
textAlign:"center",
align:"center",
redrawOnChange:true,
hoverAlign:"left",
_constructor:"SelectItem"
},
{
editorType: "button",
//name:"SubmitItem",
title:"Submit",
align:"right",
shouldSaveValue: true,
_constructor:"SubmitItem",
click : function() {
//progressBar.hide();
move();
importSection.addItem(progressBar);
}
},
{
name:"Browse",
textAlign:"right",
align:"right",
_constructor:"ButtonItem",
},
{
colSpan:"*",
endRow:true,
//name:"CanvasItem0",
showTitle:true,
startRow:true,
width:"*",
canvas:DynamicForm51,
_constructor:"CanvasItem"
}
],
cellPadding:2,
minColWidth:20,
fixedColWidths:false,
saveOnEnter:true,
titleOrientation:"left",
titleWidth:500,
layoutAlign:"right",
visibility:"visible"
})
var progressBar = isc.Progressbar.create ({
title: "Current Status Indicator",
ID: "progressBar",
showTitle:true,
//ID: "progressBar",
name: "progressBar",
shouldSaveValue: true,
//width:25,
//height:10,
length:250,
titleAlign: "center",
titleOrientation: "left",
animateMoveTime: 10,
})
progressBar.hide();
function move() {
//progressBar.show();
progressBar.setPercentDone(50);
}
console.log(5):
function update() {
var barValue = 0;
var maxValue = 100;
setInterval(function() {
//var barValue = (1 + 100 * Math.random());
barValue += 5;
progressBar.setPercentDone(barValue);
//progressBar.animateShow();
if (barValue >= maxValue) clearInterval(progressbar);
progressBar.animateShow();
console.log(barValue);
}, 1000);
}
我想为时间生成一个 progressbar
(假设 1 分钟)。表示用户应该看到 0
到 100%
功能 1 分钟。
isc.DynamicForm.create({
ID:"DynamicForm51",
autoDraw:false,
})
var importSection = isc.DynamicForm.create({
ID:"DynamicForm42",
autoDraw:false,
numCols:2,
width:950,
items:[
{
name:"ImportSection",
titleAlign:"center",
textAlign:"center",
align:"center",
redrawOnChange:true,
hoverAlign:"left",
_constructor:"SelectItem"
},
{
editorType: "button",
//name:"SubmitItem",
title:"Submit",
align:"right",
shouldSaveValue: true,
_constructor:"SubmitItem",
click : function() {
//progressBar.hide();
move();
importSection.addItem(progressBar);
}
},
{
name:"Browse",
textAlign:"right",
align:"right",
_constructor:"ButtonItem",
},
{
colSpan:"*",
endRow:true,
//name:"CanvasItem0",
showTitle:true,
startRow:true,
width:"*",
canvas:DynamicForm51,
_constructor:"CanvasItem"
}
],
cellPadding:2,
minColWidth:20,
fixedColWidths:false,
saveOnEnter:true,
titleOrientation:"left",
titleWidth:500,
layoutAlign:"right",
visibility:"visible"
})
var progressBar = isc.Progressbar.create ({
title: "Current Status Indicator",
ID: "progressBar",
showTitle:true,
//ID: "progressBar",
name: "progressBar",
shouldSaveValue: true,
//width:25,
//height:10,
length:250,
titleAlign: "center",
titleOrientation: "left",
animateMoveTime: 10,
})
progressBar.hide();
function move() {
//progressBar.show();
progressBar.setPercentDone(50);
}
console.log(5):
function update() {
var barValue = 0;
var maxValue = 100;
setInterval(function() {
//var barValue = (1 + 100 * Math.random());
barValue += 5;
progressBar.setPercentDone(barValue);
//progressBar.animateShow();
if (barValue >= maxValue) clearInterval(progressbar);
progressBar.animateShow();
console.log(barValue);
}, 1000); }