Dave Schuyler 21 роки тому
батько
коміт
c92207d81a
1 змінених файлів з 3 додано та 0 видалено
  1. 3 0
      direct/src/gui/DirectEntry.py

+ 3 - 0
direct/src/gui/DirectEntry.py

@@ -32,6 +32,9 @@ class DirectEntry(DirectFrame):
             ('focus',           0,                self.setFocus),
             ('focus',           0,                self.setFocus),
             ('cursorKeys',      0,                self.setCursorKeysActive),
             ('cursorKeys',      0,                self.setCursorKeysActive),
             ('obscured',        0,                self.setObscureMode),
             ('obscured',        0,                self.setObscureMode),
+            # Setting backgroundFocus allows the entry box to get keyboard
+            # events that are not handled by other things (i.e. events that
+            # fall through to the background):
             ('backgroundFocus', 0,                self.setBackgroundFocus),
             ('backgroundFocus', 0,                self.setBackgroundFocus),
             # Text used for the PGEntry text node
             # Text used for the PGEntry text node
             # NOTE: This overrides the DirectFrame text option
             # NOTE: This overrides the DirectFrame text option