ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 28 Feb 2017 04:55:00 +0100Button Callbackshttps://ask.sagemath.org/question/36724/button-callbacks/ Is it possible to create buttons inside of a cell that have callback functions as opposed to the buttons being used as selectors?Fri, 24 Feb 2017 21:07:45 +0100https://ask.sagemath.org/question/36724/button-callbacks/Answer by paulmasson for <p>Is it possible to create buttons inside of a cell that have callback functions as opposed to the buttons being used as selectors?</p>
https://ask.sagemath.org/question/36724/button-callbacks/?answer=36726#post-id-36726The legacy Sage notebook had [JavascriptCodeButton](http://doc.sagemath.org/html/en/reference/notebook/sagenb/notebook/interact.html#sagenb.notebook.interact.JavascriptCodeButton) but this was apparently not implemented in SageMathCell. The latter does have a `Button` element that can be used to run Python code as part of the interact: you can find an example at the beginning of this [Python source file](https://github.com/sagemath/sagecell/blob/master/interact_sagecell.py).Fri, 24 Feb 2017 23:09:45 +0100https://ask.sagemath.org/question/36724/button-callbacks/?answer=36726#post-id-36726Comment by mcweihing for <p>The legacy Sage notebook had <a href="http://doc.sagemath.org/html/en/reference/notebook/sagenb/notebook/interact.html#sagenb.notebook.interact.JavascriptCodeButton">JavascriptCodeButton</a> but this was apparently not implemented in SageMathCell. The latter does have a <code>Button</code> element that can be used to run Python code as part of the interact: you can find an example at the beginning of this <a href="https://github.com/sagemath/sagecell/blob/master/interact_sagecell.py">Python source file</a>.</p>
https://ask.sagemath.org/question/36724/button-callbacks/?comment=36744#post-id-36744is this still supported in sagecell?Mon, 27 Feb 2017 03:52:19 +0100https://ask.sagemath.org/question/36724/button-callbacks/?comment=36744#post-id-36744Comment by paulmasson for <p>The legacy Sage notebook had <a href="http://doc.sagemath.org/html/en/reference/notebook/sagenb/notebook/interact.html#sagenb.notebook.interact.JavascriptCodeButton">JavascriptCodeButton</a> but this was apparently not implemented in SageMathCell. The latter does have a <code>Button</code> element that can be used to run Python code as part of the interact: you can find an example at the beginning of this <a href="https://github.com/sagemath/sagecell/blob/master/interact_sagecell.py">Python source file</a>.</p>
https://ask.sagemath.org/question/36724/button-callbacks/?comment=36753#post-id-36753Answer updatedMon, 27 Feb 2017 23:14:35 +0100https://ask.sagemath.org/question/36724/button-callbacks/?comment=36753#post-id-36753Comment by mcweihing for <p>The legacy Sage notebook had <a href="http://doc.sagemath.org/html/en/reference/notebook/sagenb/notebook/interact.html#sagenb.notebook.interact.JavascriptCodeButton">JavascriptCodeButton</a> but this was apparently not implemented in SageMathCell. The latter does have a <code>Button</code> element that can be used to run Python code as part of the interact: you can find an example at the beginning of this <a href="https://github.com/sagemath/sagecell/blob/master/interact_sagecell.py">Python source file</a>.</p>
https://ask.sagemath.org/question/36724/button-callbacks/?comment=36755#post-id-36755thank you very muchTue, 28 Feb 2017 04:55:00 +0100https://ask.sagemath.org/question/36724/button-callbacks/?comment=36755#post-id-36755