How to create a textfield in custom window editor using a button?

Hi,

I have a button on my custom editor and wanted to add a text field just on top of button on button click.
For Eg:

i currently have this:-

124495-capture.png

If the button is pressed, i want this:-

124500-capture2.png

every time the button is pressed, one more input below input 1 should come.

How can I do that?

I guess you want to store the values in some kind of list then? Just draw a text field for each list entry and make the button add a list entry.

private List&ltstring&gt list;
...
for (int i = 0; i < list.Count; i++) {
    list _= GUILayout.TextField(list*);*_
_*}*_
_*if (GUILayout.Button("+")) {*_
 _*list.Add("");*_
_*}*_
_*
*_