2017-01-17 9 views
-2

progressbar (시간을 1 분으로 가정)을 생성하고 싶습니다. 사용자는 0 ~ 100% 기능을 1 분간보아야합니다.진행률 표시 줄 bysubmitbutton을 생성합니다. 시간 진행 막대를 생성하고 싶습니다. (1 분이라고 가정하십시오.) 사용자가 1 분 동안 0 ~ 100 % 기능을보아야합니다.

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): 
+0

http://www.smartclient.com/smartclient-11.0/isomorphic/system/reference/SmartClient_Reference.html#search=progressbar 스마트 클라이언트 프레임 워크를 사용합니다. 미리 답변 해 주셔서 감사합니다 –

+0

질문을 완전히 읽을 수 없습니다 - 코드의 서식을 지정하고 코드의 어디에 문제가 있는지 설명 할 수 있습니까? –

+0

귀하의 질문은 무엇입니까? –

답변

1
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); }