deletetext ('gedit', 'txtName', 1, 3)
This is to delete the text from the startindex to endindex specified in the 'txtName'field.