test_progress.xfdl 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="test_progress" classname="test_progress" inheritanceid="" position="absolute 0 0 539 339" titletext="New Form">
  5. <Layouts>
  6. <Layout>
  7. <Button id="Button00" taborder="0" text="Button00" position="absolute 48 42 148 62" onclick="Button00_onclick"/>
  8. <Static id="Static00" text="Static00" position="absolute 48 78 148 98"/>
  9. <ProgressBar id="ProgressBar00" taborder="1" text="ProgressBar00" max="100" min="0" position="absolute 48 112 220 127"/>
  10. <Edit id="Edit00" taborder="2" position="absolute 267 120 367 140"/>
  11. </Layout>
  12. </Layouts>
  13. <Script type="xscript4.0"><![CDATA[
  14. function Button00_onclick(obj:Button, e:ClickEventInfo)
  15. {
  16. var rowcount = 10000;
  17. ProgressBar00.max = rowcount;
  18. ProgressBar00.min = 0;
  19. ProgressBar00.pos = 0;
  20. ProgressBar00.text = ProgressBar00.pos + " / " + ProgressBar00.max;
  21. for(var i = 0; i < rowcount; i++) {
  22. Static00.text = i;
  23. ProgressBar00.pos = i;
  24. ProgressBar00.text = ProgressBar00.pos + " / " + ProgressBar00.max;
  25. this.updateWindow();
  26. }
  27. Static00.text = rowcount;
  28. ProgressBar00.pos = rowcount;
  29. ProgressBar00.text = ProgressBar00.pos + " / " + ProgressBar00.max;
  30. this.updateWindow();
  31. }
  32. ]]></Script>
  33. </Form>
  34. </FDL>