direct.gui.DirectEntry

from direct.gui.DirectEntry import DirectEntry

Contains the DirectEntry class, a type of DirectGUI widget that accepts text entered using the keyboard.

See the DirectEntry page in the programming manual for a more in-depth explanation and an example of how to use this class.

Inheritance diagram

Inheritance diagram of direct.gui.DirectEntry

class DirectEntry(parent=None, **kw)[source]

Bases: DirectFrame

DirectEntry(parent) - Create a DirectGuiWidget which responds to keyboard buttons

AllowCapNamePrefixes = ('Al', 'Ap', 'Ben', 'De', 'Del', 'Della', 'Delle', 'Der', 'Di', 'Du', 'El', 'Fitz', 'La', 'Las', 'Le', 'Les', 'Lo', 'Los', 'Mac', 'St', 'Te', 'Ten', 'Van', 'Von')
ForceCapNamePrefixes = ("D'", 'DeLa', "Dell'", "L'", "M'", 'Mc', "O'")
__init__(parent=None, **kw)[source]
autoCapitalizeFunc()[source]
commandFunc(event)[source]
destroy()[source]
directWtext = 1
enterText(text)[source]

sets the entry’s text, and moves the cursor to the end

failedCommandFunc(event)[source]
focusInCommandFunc()[source]
focusOutCommandFunc()[source]
get(plain=False)[source]

Returns the text currently showing in the typable region. If plain is True, the returned text will not include any formatting characters like nested color-change codes.

getBounds(state=0)[source]
getCursorPosition()[source]
getFont()[source]
getNumCharacters()[source]
set(text)[source]

Changes the text currently showing in the typable region; does not change the current cursor position. Also see enterText().

setBackgroundFocus()[source]
setClickSound()[source]
setCursorKeysActive()[source]
setCursorPosition(pos)[source]
setFocus()[source]
setObscureMode()[source]
setOverflowMode()[source]
setRolloverSound()[source]
setup()[source]
updateNumLines()[source]
updateWidth()[source]