diff --git a/direct/src/gui/DirectEntry.py b/direct/src/gui/DirectEntry.py index 2eb7607400..6955e550a2 100644 --- a/direct/src/gui/DirectEntry.py +++ b/direct/src/gui/DirectEntry.py @@ -59,6 +59,8 @@ class DirectEntry(DirectFrame): # Text used for the PGEntry text node # NOTE: This overrides the DirectFrame text option ('initialText', '', DGG.INITOPT), + # Enable or disable text overflow scrolling + ('overflow', 0, self.setOverflowMode), # Command to be called on hitting Enter ('command', None, None), ('extraArgs', [], None), @@ -159,6 +161,9 @@ class DirectEntry(DirectFrame): def setCursorKeysActive(self): PGEntry.setCursorKeysActive(self.guiItem, self['cursorKeys']) + def setOverflowMode(self): + PGEntry.set_overflow_mode(self.guiItem, self['overflow']) + def setObscureMode(self): PGEntry.setObscureMode(self.guiItem, self['obscured'])