Package: gtk
Class gtk-entry
Superclassesgtk-widget, gtk-buildable, gtk-editable, gtk-cell-editable, g-object, common-lisp:standard-object, common-lisp:t Documented SubclassesDirect SlotsDetails The gtk-entry widget is a single line text entry widget.
A fairly large set of key bindings are supported by default. If the entered
text is longer than the allocation of the widget, the widget will scroll so
that the cursor position is visible. When using an entry for passwords and other sensitive information, it can be put into "password mode" using the gtk-entry-visibility function. In this mode, entered text is displayed using a 'invisible' character. By default, GTK picks the best invisible character that is available in the current font, but it can be changed with the gtk-entry-invisible-char function. GTK displays a warning when Caps Lock or input methods might interfere with entering text in a password entry. The warning can be turned off with the caps-lock-warning property. The gtk-entry widget has the ability to display progress or activity information behind the text. To make an entry display such information, use the gtk-entry-progress-fraction or gtk-entry-progress-pulse-step functions. Additionally, the gtk-entry widget can show icons at either side of the entry. These icons can be activatable by clicking, can be set up as drag source and can have tooltips. To add an icon, use the gtk-entry-set-icon-from-gicon function or one of the various other functions that set an icon from a stock ID, an icon name or a pixbuf. To trigger an action when the user clicks an icon, connect to the "icon-press" signal. To allow DND operations from an icon, use the gtk-entry-set-icon-drag-source function. To set a tooltip on an icon, use the gtk-entry-icon-tooltip-text function or the corresponding function for markup. Note that functionality or information that is only available by clicking on an icon in an entry may not be accessible at all to users which are not able to use a mouse or other pointing device. It is therefore recommended that any such functionality should also be available by other means, e.g. via the context menu of the entry. Style Property Details
Signal DetailsThe "activate" signallambda (entry) :actionA keybinding signal which gets emitted when the user activates the entry. Applications should not connect to it, but may emit it with the g-signal-emit function if they need to control activation programmatically. The default bindings for this signal are all forms of the Enter key.
The "backspace" signallambda (entry) :actionA keybinding signal which gets emitted when the user asks for it. The default bindings for this signal are the Backspace and Shift-Backspace keys.
The "copy-clipboard" signallambda (entry) :actionA keybinding signal which gets emitted to copy the selection to the clipboard. The default bindings for this signal are the Ctrl-c and Ctrl-Insert keys.
The "cut-clipboard" signallambda (entry) :actionA keybinding signal which gets emitted to cut the selection to the clipboard. The default bindings for this signal are the Ctrl-x and Shift-Delete keys.
The "delete-from-cursor" signallambda (entry type count) :actionA keybinding signal which gets emitted when the user initiates a text deletion. If the type is :chars of the gtk-delete-type enumeration, GTK deletes the selection if there is one, otherwise it deletes the requested number of characters. The default bindings for this signal are the Delete key for deleting a character and the Ctrl-Delete key for deleting a word.
The "icon-press" signallambda (entry pos event) :run-lastThe signal is emitted when an activatable icon is clicked.
The "icon-release" signallambda (entry pos event) :run-lastThe signal is emitted on the button release from a mouse click over an activatable icon.
The "insert-at-cursor" signallambda (entry string) :actionA keybinding signal which gets emitted when the user initiates the insertion of a fixed string at the cursor. The signal has no default bindings.
The "insert-emoji" signallambda (entry) :actionA keybinding signal which gets emitted to present the Emoji chooser for the entry. The default bindings for this signal are the Ctrl-. and Ctrl-; keys. Since 3.22
The "move-cursor" signallambda (entry step count extend) :actionA keybinding signal which gets emitted when the user initiates a cursor movement. If the cursor is not visible in the entry, this signal causes the viewport to be moved instead. Applications should not connect to it, but may emit it with the g-signal-emit function if they need to control the cursor programmatically. The default bindings for this signal come in two variants, the variant with the Shift modifier extends the selection, the variant without the Shift modifer does not. There are too many key combinations to list them all here.
The "paste-clipboard" signallambda (entry) :actionA keybinding signal which gets emitted to paste the contents of the clipboard into the text view. The default bindings for this signal are the Ctrl-v and Shift-Insert keys.
The "populate-popup" signallambda (entry widget) :run-lastThe signal gets emitted before showing the context menu of the entry. If you need to add items to the context menu, connect to this signal and append your items to the widget, which will be a gtk-menu widget in this case. If the populate-all property is true, this signal will also be emitted to populate touch popups. In this case, widget will be a different container, e.g. a gtk-toolbar widget. The signal handler should not make assumptions about the type of the widget.
The "preedit-changed" signallambda (entry preedit) :actionIf an input method is used, the typed text will not immediately be committed to the buffer. So if you are interested in the text, connect to this signal.
The "toggle-overwrite" signallambda (entry) :actionA keybinding signal which gets emitted to toggle the overwrite mode of the entry. The default bindings for this signal is the Insert key.
| Slot Access FunctionsInherited Slot Access FunctionsSee also |
*2021-11-2