I have done that. thank you. Now problem is that i want to place this text box at the position of cursor e-g if the cursor is at line no 3 then this text box should be added at line no 3. Also when i have finished entering text in this text box, i want that cursor is placed below this text box.