I have a DynamicModule
in which I which I wish to start an operation (actually import files) with a button. I would like to monitor the progress with a ProgressIndicator but can't get it to work. This simple example works:
Monitor[
Table[Pause[0.1]; n, {n, 1, 100}],
Dynamic[ProgressIndicator[n, {1, 100}]]
];
I find it interesting that it works even with the final semi-colon. In a DynamicModule
this also works:
ClearAll[test];
test[] := DynamicModule[{},
Row[{Monitor[
Table[Pause[0.1]; n, {n, 1, 100}],
Dynamic[ProgressIndicator[n, {1, 100}]]
];}]
]
test[]
Now I try to put in a button to start and I am lost
ClearAll[test1];
test1[] := DynamicModule[{},
Row[{Button["Start", Monitor[
Table[Pause[0.1]; n, {n, 1, 100}],
Dynamic[ProgressIndicator[n, {1, 100}]]
];]}]
]
test1[]
I have tried several alternatives with no success. I would like the progress indicator to appear in the same row as the button once it has been pressed.