5

The function StatusArea can be used to display stuff in the status area, but only when the user hovers the mouse over the appropriate location.

I want to display a message in the status area for a few seconds, and not requiring the user to hover the mouse anywhere for this to happen.


Basically, I have a function that restarts the kernel (based on one from here); I want it to briefly display a message like "Kernel restarted" in the status area.

kjo
  • 11,717
  • 1
  • 30
  • 89

1 Answers1

7

Like that?

CurrentValue[EvaluationNotebook[], WindowStatusArea] = "whatever"
Pause[1]
CurrentValue[EvaluationNotebook[], WindowStatusArea] = Inherited

probably something like this will give you more flexibility:

With[
    {nb = EvaluationNotebook[]}
  , CurrentValue[nb, WindowStatusArea] = "whatever"
  ; RunScheduledTask[CurrentValue[nb, WindowStatusArea] = Inherited, {1}]
];
Kuba
  • 136,707
  • 13
  • 279
  • 740