How to create a button, which has exactly the same functionality as pressing ctlr+2 in an inputField? So it is basicly appending an sqrt sign to a string.

  • 3
    $\begingroup$ Um, did you try searching on your own ? Like, CreatePalette, etc ? $\endgroup$ – Sektor Aug 26 '15 at 17:36
CreatePalette[{"Square root",PasteButton[Sqrt@\[SelectionPlaceholder]]}]
  • $\begingroup$ Can't just ignore simplicity and readability; +1 $\endgroup$ – Sektor Aug 26 '15 at 17:49
  • $\begingroup$ In a .nb notebook, it opens a new notebook for the palette everytime i run it, and if I try to close this palette, it asks me if i want to save it or not. ...strange $\endgroup$ – Ricsi Nincs Aug 26 '15 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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