Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want a column with textcells and a button to add an extra textcell:

Column[{Button["New line"],
TextCell["a", "Text", FontFamily -> "Times", FontWeight -> Plain, Editable -> True]},
Editable -> False]

How to do this? I want the first click to make it be like:

Column[{Button["New line"],
TextCell["However this has been edited", "Text", FontFamily -> "Times", FontWeight -> Plain, Editable -> True],
TextCell["a", "Text", FontFamily -> "Times", FontWeight -> Plain, Editable -> True]},
Editable -> False]
share|improve this question
Could you please respond to Michael's answer. Does it fit your needs? – Kuba Jan 30 '14 at 21:50

Perhaps something like this? Using InputField is more convenient than figuring out how to write a text cell that stores its edited text in a dynamically updated variable. (That's basically the function of InputField anyway.)

newline[Dynamic[texts_], text0_: ""] := (
   AppendTo[texts, text0];
   With[{n = Length[texts]},
    InputField[Dynamic[texts[[n]]], String, Appearance -> "Frameless",
      BaseStyle -> {FontFamily -> "Times", FontWeight -> Plain, 
       Editable -> True}, FieldHint -> "enter text"]

DynamicModule[{lines, texts = {}, btn},
 lines = {
   newline[Dynamic[texts], "However this has been edited"],
   newline[Dynamic[texts], "a"]};
 btn = Button["New line", AppendTo[lines, newline[Dynamic[texts]]]];
 Dynamic @ Column[{btn} ~Join~ lines, Editable -> False]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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