diff --git a/direct/src/gui/DirectEntry.py b/direct/src/gui/DirectEntry.py index 2743aedc37..a4283377a7 100644 --- a/direct/src/gui/DirectEntry.py +++ b/direct/src/gui/DirectEntry.py @@ -156,5 +156,7 @@ class DirectEntry(DirectFrame): else: self.guiItem.setCursorPosition(pos) - - + def enterText(self, text): + """ sets the entry's text, and moves the cursor to the end """ + self.set(text) + self.setCursorPosition(len(self.get()))