5
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ related: 66773 $\endgroup$
    – Kuba
    Mar 14, 2017 at 22:27
  • $\begingroup$ Also related: (26438) $\endgroup$
    – Mr.Wizard
    Jul 25, 2018 at 9:09

1 Answer 1

7
$\begingroup$

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}]
];
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.