implements a cursor to the textfield