i = TextEdit.SelectionStart TextEdit.Text = StrInsert(TextEdit.Text,i,"[]") TextEdit.SelectionStart = i + 1 TextEdit.ScrollToCaret