New answers tagged

1

As confirmed by both WRI support and @ihojnicki, this is currently not possible. The front-end does not appear to be able to handle nested EventHandler expressions on its own. Quoting WRI support: ([CASE:4372001]) It does appear that Nested EventHandler is not behaving properly when all computations are moved to front-end. I have forwarded an issue ...


5

Instead, it is moved to after the cell containing the button, as if I had specified Cell instead of CellGroup in SelectionMove. On October, I reported this issue to the Wolfram support: [CASE:4323226]. They confirmed the bug and suggested a workaround. Here is the response: It does appear that SelectionMove is not behaving properly. <...> In the ...


5

button = Button["Move", SelectionMove[EvaluationCell[], After, GeneratedCell]]; Print["one"] Print[button] Print["two"] Print["three"] Print["four"] Alternatively, using a number greater than 1 in the fourth argument of SelectionMove gives the same behavior: button = Button["Move", SelectionMove[EvaluationCell[], After, CellGroup, 2]]; Print["one"...


3

Unfortunately cell groups api is very limited so can't say it is robust but it should work assuming the cell group structure you've described is in place. Button["Move", FrontEndExecute[{ SelectionMove[EvaluationCell[], All, Cell]; SelectionMove[EvaluationNotebook[], All, CellGroup]; SelectionMove[EvaluationNotebook[], After, CellGroup] }], ...


Top 50 recent answers are included