nwhitehead / pineapple

http://nwhitehead.github.io/pineapple/
Other
352 stars 26 forks source link

Question: How to add buttons? #43

Open tomron opened 8 years ago

nwhitehead commented 8 years ago

I'm not sure I understand the question but I'll take a try.

If the question is, "How do I turn an input cell into a button?" then the answer is to first make it a code cell and get it working normally doing what you want when you evaluate it. Then select the cell and choose the menu item "Tools -> Button -> Run button". This will change the cell into a button that you can click to evaluate. I use this to tidy up notebooks so that viewers can evaluate the cell but not have to worry about what it's doing (because the cell is using features that have not been explained yet).

If the question is, "How do I add a toolbar button in Pineapple?" then the answer is currently you have to add C++ code and recompile to modify the toolbar. There is no modular system like in Jupyter where you can add toolbar buttons from an extension.