dlgTextEntry: move code to TextEntry.cpp