MathGroup Archive 2011

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

Search the Archive

Re: Listbox type progress display?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119466] Re: Listbox type progress display?
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Sun, 5 Jun 2011 07:03:03 -0400 (EDT)
  • References: <isd0vg$1pt$1@smc.vnet.net>

Hi,
>
> I sometimes use a workbook as a program that should process start to
> finish.  CTRL-A, Shift-Enter.  What I would like to have is a single
> place to monitor for status.  In Windows I would use a ListBox().
> This is a small, multi-line text window with scroll capability you
> can add text to at any time.  I.e.
>
> ListBox.Add[myBox, "Starting Execution "] ListBox.Add[myBox, "Main
> task finished "] ListBox.Add[myBox, "All Tasks finished. "]
>
> Anyone know how to accomplish the same functionality with a Notebook
> interface?  It can write anywhere.  It doesn't have to be a pop-up.

This is not very sophisticated, but does the job and is relatively simple:

nb = CreateDocument[{}];

notebookAdd[x_] := (
   NotebookWrite[nb, x];
   SelectionMove[nb, After, Cell];
   )

Do[
  Pause[0.1];
  notebookAdd[i],
  {i, 1, 50}
  ]

if you don't need the history, you can also write to the status area
with

SetOptions[EvaluationNotebook[],WindowStatusArea->"test"]

hth,

albert


  • Prev by Date: Re: FindCurvePath causes a crash
  • Next by Date: Re: Template for developing a package application in workbench
  • Previous by thread: Listbox type progress display?
  • Next by thread: Re: Listbox type progress display?