Package: gtk
Class gtk:entry
Superclassesgtk:widget, gobject:initially-unowned, gtk:accessible, gtk:buildable, gtk:constraint-target, gtk:editable, gtk:cell-editable, gobject:object, common-lisp:standard-object, common-lisp:t Documented Subclasses
None
Direct SlotsDetails The gtk:entry widget is a single line text entry.
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 a text 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 an '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. The gtk:entry widget has the ability to display progress or activity information behind the text. To make a text 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 text 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 an icon name or a paintable. 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 text 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 such functionality is also available by other means, such as the context menu of the text entry. CSS nodesentry[.flat][.warning][.error] ├── text[.readonly] ├── image.left ├── image.right ╰── [progress[.pulse]]The gtk:entry implementation has a main node with the name entry. Depending on the properties of the text entry, the .read-only and .flat style classes may appear. The .warning and .error style classes may also be used with entries. When the text entry shows icons, it adds subnodes with the name image and the .left or .right style class, depending on where the icon appears. When the text entry shows progress, it adds a subnode with the name progress. The node has the .pulse style class when the shown progress is pulsing. For all the subnodes added to the text node in various situations, see the gtk:text widget. GtkEntry as GtkBuildableAn example of a UI definition fragment specifying Pango attributes: <object class="GtkEntry"> <attributes> <attribute name="weight" value="PANGO_WEIGHT_BOLD"/> <attribute name="background" value="red" start="5" end="10"/> </attributes> </object>The start and end attributes specify the range of characters to which the Pango attribute applies. If start and end are not specified, the attribute is applied to the whole text. Note that specifying ranges does not make much sense with translatable attributes. Use markup embedded in the translatable content instead. AccessibilitySignal DetailsThe "activate" signallambda (entry) :action
The "icon-press" signallambda (entry pos) :run-last
The "icon-release" signallambda (entry pos) :run-last
| Returned bySlot Access FunctionsInherited Slot Access FunctionsSee also |
2024-11-26