Click or drag to resize

LineEdit Properties

The LineEdit type exposes the following members.

Properties
  NameDescription
Public property_ImportPath (Inherited from Node.)
Public propertyAlign
Public propertyAnchorBottom

Anchors the bottom edge of the node to the origin, the center, or the end of its parent control. It changes how the bottom margin updates when the node moves or changes size. You can use one of the ControlAnchor constants for convenience.

(Inherited from Control.)
Public propertyAnchorLeft

Anchors the left edge of the node to the origin, the center or the end of its parent control. It changes how the left margin updates when the node moves or changes size. You can use one of the ControlAnchor constants for convenience.

(Inherited from Control.)
Public propertyAnchorRight

Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right margin updates when the node moves or changes size. You can use one of the ControlAnchor constants for convenience.

(Inherited from Control.)
Public propertyAnchorTop

Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top margin updates when the node moves or changes size. You can use one of the ControlAnchor constants for convenience.

(Inherited from Control.)
Public propertyCaretBlink

If true, the caret (visual cursor) blinks.

Public propertyCaretBlinkSpeed

Duration (in seconds) of a caret's blinking cycle.

Public propertyCaretPosition

The cursor's position inside the LineEdit. When set, the text may scroll to accommodate it.

Public propertyClearButtonEnabled

If true, the LineEdit will show a clear button if text is not empty, which can be used to clear the text quickly.

Public propertyContextMenuEnabled

If true, the context menu will appear when right-clicked.

Public propertyCustomMultiplayer

The override to the default MultiplayerAPI. Set to null to use the default SceneTree one.

(Inherited from Node.)
Public propertyDynamicObject
Gets a new DynamicGodotObject associated with this instance.
(Inherited from Object.)
Public propertyEditable

If false, existing text cannot be modified and new text cannot be added.

Public propertyEditorDescription (Inherited from Node.)
Public propertyExpandToTextLength

If true, the LineEdit width will increase to stay longer than the Text. It will not compress if the Text is shortened.

Public propertyFilename

When a scene is instanced from a file, its topmost node contains the filename from which it was loaded.

(Inherited from Node.)
Public propertyFocusMode

The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals.

(Inherited from Control.)
Public propertyFocusNeighbourBottom

Tells Godot which node it should give keyboard focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the ui_down input action. The node must be a Control. If this property is not set, Godot will give focus to the closest Control to the bottom of this one.

(Inherited from Control.)
Public propertyFocusNeighbourLeft

Tells Godot which node it should give keyboard focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the ui_left input action. The node must be a Control. If this property is not set, Godot will give focus to the closest Control to the left of this one.

(Inherited from Control.)
Public propertyFocusNeighbourRight

Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the ui_right input action. The node must be a Control. If this property is not set, Godot will give focus to the closest Control to the bottom of this one.

(Inherited from Control.)
Public propertyFocusNeighbourTop

Tells Godot which node it should give keyboard focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the ui_top input action. The node must be a Control. If this property is not set, Godot will give focus to the closest Control to the bottom of this one.

(Inherited from Control.)
Public propertyFocusNext

Tells Godot which node it should give keyboard focus to if the user presses Tab on a keyboard by default. You can change the key by editing the ui_focus_next input action.

If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree.

(Inherited from Control.)
Public propertyFocusPrevious

Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab on a keyboard by default. You can change the key by editing the ui_focus_prev input action.

If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree.

(Inherited from Control.)
Public propertyGrowHorizontal

Controls the direction on the horizontal axis in which the control should grow if its horizontal minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size.

(Inherited from Control.)
Public propertyGrowVertical

Controls the direction on the vertical axis in which the control should grow if its vertical minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size.

(Inherited from Control.)
Public propertyHintTooltip

Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the MouseFilter property is not . You can change the time required for the tooltip to appear with gui/timers/tooltip_delay_sec option in Project Settings.

The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding _MakeCustomTooltip(String). The default tooltip includes a PopupPanel and Label whose theme properties can be customized using Theme methods with the "TooltipPanel" and "TooltipLabel" respectively. For example:

var style_box = StyleBoxFlat.new()
style_box.set_bg_color(Color(1, 1, 0))
style_box.set_border_width_all(2)
# We assume here that the `theme` property has been assigned a custom Theme beforehand.
theme.set_stylebox("panel", "TooltipPanel", style_box)
theme.set_color("font_color", "TooltipLabel", Color(0, 1, 1))

(Inherited from Control.)
Public propertyInputPassOnModalCloseClick

Enables whether input should propagate when you close the control as modal.

If false, stops event handling at the viewport input event handling. The viewport first hides the modal and after marks the input as handled.

(Inherited from Control.)
Public propertyLightMask

The rendering layers in which this CanvasItem responds to Light2D nodes.

(Inherited from CanvasItem.)
Public propertyMarginBottom

Distance between the node's bottom edge and its parent control, based on AnchorBottom.

Margins are often controlled by one or multiple parent Container nodes, so you should not modify them manually if your node is a direct child of a Container. Margins update automatically when you move or resize the node.

(Inherited from Control.)
Public propertyMarginLeft

Distance between the node's left edge and its parent control, based on AnchorLeft.

Margins are often controlled by one or multiple parent Container nodes, so you should not modify them manually if your node is a direct child of a Container. Margins update automatically when you move or resize the node.

(Inherited from Control.)
Public propertyMarginRight

Distance between the node's right edge and its parent control, based on AnchorRight.

Margins are often controlled by one or multiple parent Container nodes, so you should not modify them manually if your node is a direct child of a Container. Margins update automatically when you move or resize the node.

(Inherited from Control.)
Public propertyMarginTop

Distance between the node's top edge and its parent control, based on AnchorTop.

Margins are often controlled by one or multiple parent Container nodes, so you should not modify them manually if your node is a direct child of a Container. Margins update automatically when you move or resize the node.

(Inherited from Control.)
Public propertyMaterial

The material applied to textures on this CanvasItem.

(Inherited from CanvasItem.)
Public propertyMaxLength

Maximum amount of characters that can be entered inside the LineEdit. If 0, there is no limit.

Public propertyModulate

The color applied to textures on this CanvasItem.

(Inherited from CanvasItem.)
Public propertyMouseDefaultCursorShape

The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors.

Note: On Linux, shapes may vary depending on the cursor theme of the system.

(Inherited from Control.)
Public propertyMouseFilter

Controls whether the control will be able to receive mouse button input events through _GuiInput(InputEvent) and how these events should be handled. Also controls whether the control can receive the mouse_entered, and mouse_exited signals. See the constants to learn what each does.

(Inherited from Control.)
Public propertyMultiplayer

The MultiplayerAPI instance associated with this node. Either the CustomMultiplayer, or the default SceneTree one (if inside tree).

(Inherited from Node.)
Public propertyName

The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed.

Note: Auto-generated names might include the @ character, which is reserved for unique names when using AddChild(Node, Boolean). When setting the name manually, any @ will be removed.

(Inherited from Node.)
Public propertyNativeInstance (Inherited from Object.)
Public propertyOwner

The node owner. A node can have any other node as owner (as long as it is a valid parent, grandparent, etc. ascending in the tree). When saving a node (using PackedScene), all the nodes it owns will be saved with it. This allows for the creation of complex SceneTrees, with instancing and subinstancing.

(Inherited from Node.)
Public propertyPauseMode

Pause mode. How the node will behave if the SceneTree is paused.

(Inherited from Node.)
Public propertyPlaceholderAlpha

Opacity of the PlaceholderText. From 0 to 1.

Public propertyPlaceholderText

Text shown when the LineEdit is empty. It is not the LineEdit's default value (see Text).

Public propertyProcessPriority

The node's priority in the execution order of the enabled processing callbacks (i.e. , and their internal counterparts). Nodes whose process priority value is lower will have their processing callbacks executed first.

(Inherited from Node.)
Public propertyRectClipContent

Enables whether rendering of CanvasItem based children should be clipped to this control's rectangle. If true, parts of a child which would be visibly outside of this control's rectangle will not be rendered.

(Inherited from Control.)
Public propertyRectGlobalPosition

The node's global position, relative to the world (usually to the top-left corner of the window).

(Inherited from Control.)
Public propertyRectMinSize

The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes.

(Inherited from Control.)
Public propertyRectPivotOffset

By default, the node's pivot is its top-left corner. When you change its RectScale, it will scale around this pivot. Set this property to RectSize / 2 to center the pivot in the node's rectangle.

(Inherited from Control.)
Public propertyRectPosition

The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by RectPivotOffset.

(Inherited from Control.)
Public propertyRectRotation

The node's rotation around its pivot, in degrees. See RectPivotOffset to change the pivot's position.

(Inherited from Control.)
Public propertyRectScale

The node's scale, relative to its RectSize. Change this property to scale the node around its RectPivotOffset. The Control's HintTooltip will also scale according to this value.

Note: This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the documentation instead of scaling Controls individually.

Note: If the Control node is a child of a Container node, the scale will be reset to Vector2(1, 1) when the scene is instanced. To set the Control's scale when it's instanced, wait for one frame using yield(get_tree(), "idle_frame") then set its RectScale property.

(Inherited from Control.)
Public propertyRectSize

The size of the node's bounding rectangle, in pixels. Container nodes update this property automatically.

(Inherited from Control.)
Public propertyRightIcon

Sets the icon that will appear in the right end of the LineEdit if there's no Text, or always, if ClearButtonEnabled is set to false.

Public propertySecret

If true, every character is replaced with the secret character (see SecretCharacter).

Public propertySecretCharacter

The character to use to mask secret input (defaults to "*"). Only a single character can be used as the secret character.

Public propertySelectingEnabled

If false, it's impossible to select the text using mouse nor keyboard.

Public propertySelfModulate

The color applied to textures on this CanvasItem. This is not inherited by children CanvasItems.

(Inherited from CanvasItem.)
Public propertyShortcutKeysEnabled

If false, using shortcuts will be disabled.

Public propertyShowBehindParent

If true, the object draws behind its parent.

(Inherited from CanvasItem.)
Public propertyShowOnTop

If true, the object draws on top of its parent.

(Inherited from CanvasItem.)
Public propertySizeFlagsHorizontal

Tells the parent Container nodes how they should resize and place the node on the X axis. Use one of the ControlSizeFlags constants to change the flags. See the constants to learn what each does.

(Inherited from Control.)
Public propertySizeFlagsStretchRatio

If the node and at least one of its neighbours uses the size flag, the parent Container will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbour a ratio of 1, this node will take two thirds of the available space.

(Inherited from Control.)
Public propertySizeFlagsVertical

Tells the parent Container nodes how they should resize and place the node on the Y axis. Use one of the ControlSizeFlags constants to change the flags. See the constants to learn what each does.

(Inherited from Control.)
Public propertyText

String value of the LineEdit.

Note: Changing text using this property won't emit the text_changed signal.

Public propertyTheme

Changing this property replaces the current Theme resource this node and all its Control children use.

(Inherited from Control.)
Public propertyUseParentMaterial

If true, the parent CanvasItem's Material property is used as this one's material.

(Inherited from CanvasItem.)
Public propertyVirtualKeyboardEnabled

If true, the native virtual keyboard is shown when focused on platforms that support it.

Public propertyVisible

If true, this CanvasItem is drawn. The node is only visible if all of its antecedents are visible as well (in other words, IsVisibleInTree must return true).

Note: For controls that inherit Popup, the correct way to make them visible is to call one of the multiple popup*() functions instead.

(Inherited from CanvasItem.)
Top
See Also