Skip to main content

front end - How can I create my own hover message?


I wanted to know how this "Saving to the Wolfram Cloud" message works?


enter image description here


It's useful because it hovers above the notebook's content even when scrolling and I'd like to change the text and reuse it for my own purposes.



Answer



That is almost certainly an AttachedCell, an undocumented feature which proves to be very useful.


MathLink`CallFrontEnd[FrontEnd`AttachCell[

EvaluationNotebook[],
Cell[BoxData@ToBoxes@Panel@DateString[]],
Bottom, Bottom,
"ClosingActions" -> {"OutsideMouseClick"}]
]

enter image description here


This will attatch a cell at the bottom of the notebook. You can leave ClosingActions empty if you want it to stay there. Or change it but do not put there "ParentChanged" item. This will crash the front end.


More info about syntax:




Comments