Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

ProgressIndicator inside DynamicModule

  • To: mathgroup at
  • Subject: [mg109824] ProgressIndicator inside DynamicModule
  • From: Zachar István <replicatorzed at>
  • Date: Wed, 19 May 2010 07:03:15 -0400 (EDT)

Dear Group,

dealing with dynamic functions is very frustrating: every now and then
a problem appears, which is totally against my previous experience and
knowledge, and I am simply not able to resolve it. Here is a new one,
any help would be welcome.

Why does ProgressIndicator won't work inside DynamicModule, where
1. it works without enclosing the Grid in DynamicModule,
2. the 'sw' switch is correctly displayed (but not 'pr').

 {pr = 0, range = {0, 100}, sw = False},
    Button["Push me",
     (sw = True;
      Do[pr = i; Pause[.02];, {i, range[[1]], range[[2]]}];
      sw = False;), Method -> "Queued"],
    Dynamic@ProgressIndicator[Dynamic@pr, range],
    Dynamic@Switch[sw, True, "Calculating...", False, "Finished.", _,
"Standing by."]

Thanks in advance

  • Prev by Date: Re: Select list elements and exchange them
  • Next by Date: Re: Select list elements and exchange them
  • Previous by thread: Re: an attempt at solid modeling with Mathematica
  • Next by thread: Re: ProgressIndicator inside DynamicModule