Entry

../_images/entry-preview.png

Widget description

An entry is a convenience widget which shows a box that the user can enter text into.

Entries by default don’t scroll, so they grow to accommodate the entire text, resizing the parent window as needed. This can be changed with the property scrollable.

They can also be single line or multi line (the default) and when set to multi line mode they support text wrapping in any of the modes indicated by Wrap mode.

Other features include password mode, filtering of inserted text with markup_filter_append() and related functions, inline “items” and formatted markup text.

Scrollable Interface

This widget supports the scrollable interface.

If you wish to control the scolling behaviour using these functions, inherit both the widget class and the Scrollable class using multiple inheritance, for example:

class ScrollableGenlist(Genlist, Scrollable):
    def __init__(self, canvas, *args, **kwargs):
        Genlist.__init__(self, canvas)

Formatted text

The markup tags supported by the Entry are defined by the theme, but even when writing new themes or extensions it’s a good idea to stick to a sane default, to maintain coherency and avoid application breakages. Currently defined by the default theme are the following tags:

<br>
Inserts a line break.
<ps>
Inserts a paragraph separator. This is preferred over line breaks.
<tab>
Inserts a tab.
<em>...</em>
Emphasis. Sets the oblique style for the enclosed text.
<b>...</b>
Sets the bold style for the enclosed text.
<link>...</link>
Underlines the enclosed text.
<hilight>...</hilight>
Highlights the enclosed text.

Special markups

Besides those used to format text, entries support two special markup tags used to insert click-able portions of text or items inlined within the text.

Anchors

Anchors are similar to HTML anchors. Text can be surrounded by <a> and </a> tags and an event will be generated when this text is clicked, like this:

This text is outside <a href=anc-01>but this one is an anchor</a>

The href attribute in the opening tag gives the name that will be used to identify the anchor and it can be any valid utf8 string.

When an anchor is clicked, an "anchor,clicked" signal is emitted with an EntryAnchorInfo in the event_info parameter for the callback function. The same applies for anchor,in (mouse in), anchor,out (mouse out), anchor,down (mouse down), and anchor,up (mouse up) events on an anchor.

Items

Inlined in the text, any other Object can be inserted by using <item> tags this way:

<item size=16x16 vsize=full href=emoticon/haha></item>

Just like with anchors, the href identifies each item, but these need, in addition, to indicate their size, which is done using any one of size, absize or relsize attributes. These attributes take their value in the WxH format, where W is the width and H the height of the item.

  • absize: Absolute pixel size for the item. Whatever value is set will be the item’s size regardless of any scale value the object may have been set to. The final line height will be adjusted to fit larger items.
  • size: Similar to absize, but it’s adjusted to the scale value set for the object.
  • relsize: Size is adjusted for the item to fit within the current line height.

Besides their size, items are specified a vsize value that affects how their final size and position are calculated. The possible values are:

  • ascent: Item will be placed within the line’s baseline and its ascent. That is, the height between the line where all characters are positioned and the highest point in the line. For size and absize items, the descent value will be added to the total line height to make them fit. relsize items will be adjusted to fit within this space.
  • full: Items will be placed between the descent and ascent, or the lowest point in the line and its highest.

After the size for an item is calculated, the entry will request an object to place in its space. For this, the functions set with item_provider_append() and related functions will be called in order until one of them returns a non-None value. If no providers are available, or all of them return None, then the entry falls back to one of the internal defaults, provided the name matches with one of them.

All of the following are currently supported:

  • emoticon/angry
  • emoticon/angry-shout
  • emoticon/crazy-laugh
  • emoticon/evil-laugh
  • emoticon/evil
  • emoticon/goggle-smile
  • emoticon/grumpy
  • emoticon/grumpy-smile
  • emoticon/guilty
  • emoticon/guilty-smile
  • emoticon/haha
  • emoticon/half-smile
  • emoticon/happy-panting
  • emoticon/happy
  • emoticon/indifferent
  • emoticon/kiss
  • emoticon/knowing-grin
  • emoticon/laugh
  • emoticon/little-bit-sorry
  • emoticon/love-lots
  • emoticon/love
  • emoticon/minimal-smile
  • emoticon/not-happy
  • emoticon/not-impressed
  • emoticon/omg
  • emoticon/opensmile
  • emoticon/smile
  • emoticon/sorry
  • emoticon/squint-laugh
  • emoticon/surprised
  • emoticon/suspicious
  • emoticon/tongue-dangling
  • emoticon/tongue-poke
  • emoticon/uh
  • emoticon/unhappy
  • emoticon/very-sorry
  • emoticon/what
  • emoticon/wink
  • emoticon/worried
  • emoticon/wtf

Alternatively, an item may reference an image by its path, using the URI form file:///path/to/an/image.png and the entry will then use that image for the item.

Setting entry’s style

There are 2 major ways to change the entry’s style:

  • Theme - set the “base” field to the desired style.
  • User style - Pushing overrides to the theme style to the textblock object by using text_style_user_push().

You should modify the theme when you would like to change the style for aesthetic reasons. While the user style should be changed when you would like to change the style to something specific defined at run-time, e.g, setting font or font size in a text editor.

Loading and saving files

Entries have convenience functions to load text from a file and save changes back to it after a short delay. The automatic saving is enabled by default, but can be disabled with autosave and files can be loaded directly as plain text or have any markup in them recognized. See file for more details.

Emitted signals

  • changed: The text within the entry was changed.
  • changed,user: The text within the entry was changed because of user interaction.
  • activated: The enter key was pressed on a single line entry.
  • aborted: The escape key was pressed on a single line entry. (since 1.7)
  • press: A mouse button has been pressed on the entry.
  • longpressed: A mouse button has been pressed and held for a couple seconds.
  • clicked: The entry has been clicked (mouse press and release).
  • clicked,double: The entry has been double clicked.
  • clicked,triple: The entry has been triple clicked.
  • selection,paste: A paste of the clipboard contents was requested.
  • selection,copy: A copy of the selected text into the clipboard was requested.
  • selection,cut: A cut of the selected text into the clipboard was requested.
  • selection,start: A selection has begun and no previous selection existed.
  • selection,changed: The current selection has changed.
  • selection,cleared: The current selection has been cleared.
  • cursor,changed: The cursor has changed position.
  • anchor,clicked: An anchor has been clicked. The event_info parameter for the callback will be an EntryAnchorInfo.
  • anchor,in: Mouse cursor has moved into an anchor. The event_info parameter for the callback will be an EntryAnchorInfo.
  • anchor,out: Mouse cursor has moved out of an anchor. The event_info parameter for the callback will be an EntryAnchorInfo.
  • anchor,up: Mouse button has been unpressed on an anchor. The event_info parameter for the callback will be an EntryAnchorInfo.
  • anchor,down: Mouse button has been pressed on an anchor. The event_info parameter for the callback will be an EntryAnchorInfo.
  • preedit,changed: The preedit string has changed.
  • text,set,done: Whole text has been set to the entry.
  • rejected: .Called when some of inputs are rejected by the filter. (since 1.9)

Layout content parts

  • icon - An icon in the entry
  • end - A content in the end of the entry

Layout text parts

  • default - text of the entry
  • guide - placeholder of the entry

Enumerations

Autocapitalization types

efl.elementary.ELM_AUTOCAPITAL_TYPE_NONE

No auto-capitalization when typing

efl.elementary.ELM_AUTOCAPITAL_TYPE_WORD

Autocapitalize each word typed

efl.elementary.ELM_AUTOCAPITAL_TYPE_SENTENCE

Autocapitalize the start of each sentence

efl.elementary.ELM_AUTOCAPITAL_TYPE_ALLCHARACTER

Autocapitalize all letters

Copy & paste modes

efl.elementary.ELM_CNP_MODE_MARKUP

Copy & paste text with markup tags

efl.elementary.ELM_CNP_MODE_NO_IMAGE

Copy & paste text without item (image) tags

efl.elementary.ELM_CNP_MODE_PLAINTEXT

Copy & paste text without markup tags

Input Hints

efl.elementary.ELM_INPUT_HINT_NONE

No active hints

New in version 1.12.

efl.elementary.ELM_INPUT_HINT_AUTO_COMPLETE

Suggest word auto completion

New in version 1.12.

efl.elementary.ELM_INPUT_HINT_SENSITIVE_DATA

typed text should not be stored

New in version 1.12.

Input panel language sort order

efl.elementary.ELM_INPUT_PANEL_LANG_AUTOMATIC

Automatic

efl.elementary.ELM_INPUT_PANEL_LANG_ALPHABET

Alphabetic

Input panel layouts

efl.elementary.ELM_INPUT_PANEL_LAYOUT_NORMAL

Default layout

efl.elementary.ELM_INPUT_PANEL_LAYOUT_NUMBER

Number layout

efl.elementary.ELM_INPUT_PANEL_LAYOUT_EMAIL

Email layout

efl.elementary.ELM_INPUT_PANEL_LAYOUT_URL

URL layout

efl.elementary.ELM_INPUT_PANEL_LAYOUT_PHONENUMBER

Phone number layout

efl.elementary.ELM_INPUT_PANEL_LAYOUT_IP

IP layout

efl.elementary.ELM_INPUT_PANEL_LAYOUT_MONTH

Month layout

efl.elementary.ELM_INPUT_PANEL_LAYOUT_NUMBERONLY

Number only layout

efl.elementary.ELM_INPUT_PANEL_LAYOUT_INVALID

Never use this

efl.elementary.ELM_INPUT_PANEL_LAYOUT_HEX

Hexadecimal layout

efl.elementary.ELM_INPUT_PANEL_LAYOUT_TERMINAL

Command-line terminal layout

efl.elementary.ELM_INPUT_PANEL_LAYOUT_PASSWORD

Like normal, but no auto-correct, no auto-capitalization etc.

efl.elementary.ELM_INPUT_PANEL_LAYOUT_DATETIME

Date and time layout

New in version 1.10.

efl.elementary.ELM_INPUT_PANEL_LAYOUT_EMOTICON

Emoticon layout

New in version 1.10.

Input panel normal layout variation

efl.elementary.ELM_INPUT_PANEL_LAYOUT_NORMAL_VARIATION_NORMAL

The plain normal layout

New in version 1.12.

efl.elementary.ELM_INPUT_PANEL_LAYOUT_NORMAL_VARIATION_FILENAME

Filename layout. Symbols such as ‘/’ should be disabled

New in version 1.12.

efl.elementary.ELM_INPUT_PANEL_LAYOUT_NORMAL_VARIATION_PERSON_NAME

The name of a person

New in version 1.12.

Input panel numberonly layout variation

efl.elementary.ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_NORMAL

The numberonly normal layout

New in version 1.12.

efl.elementary.ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_SIGNED

The signed number layout

New in version 1.12.

efl.elementary.ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_DECIMAL

The decimal number layout

New in version 1.12.

efl.elementary.ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_SIGNED_AND_DECIMAL

The signed and decimal number layout

New in version 1.12.

Input panel password layout variation

efl.elementary.ELM_INPUT_PANEL_LAYOUT_PASSWORD_VARIATION_NORMAL

The normal password layout

New in version 1.12.

efl.elementary.ELM_INPUT_PANEL_LAYOUT_PASSWORD_VARIATION_NUMBERONLY

The password layout to allow only number

New in version 1.12.

Input panel return key modes

efl.elementary.ELM_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT

Default

efl.elementary.ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE

Done

efl.elementary.ELM_INPUT_PANEL_RETURN_KEY_TYPE_GO

Go

efl.elementary.ELM_INPUT_PANEL_RETURN_KEY_TYPE_JOIN

Join

efl.elementary.ELM_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN

Login

efl.elementary.ELM_INPUT_PANEL_RETURN_KEY_TYPE_NEXT

Next

Search

efl.elementary.ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEND

Send

efl.elementary.ELM_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN

Sign-in

New in version 1.10.

Text format

efl.elementary.ELM_TEXT_FORMAT_PLAIN_UTF8

Plain UTF-8 type

efl.elementary.ELM_TEXT_FORMAT_MARKUP_UTF8

UTF-8 with markup

Wrap mode

efl.elementary.ELM_WRAP_NONE

No wrap

efl.elementary.ELM_WRAP_CHAR

Wrap between characters

efl.elementary.ELM_WRAP_WORD

Wrap in allowed wrapping points (as defined in the unicode standard)

efl.elementary.ELM_WRAP_MIXED

Word wrap, and if that fails, char wrap

Inheritance diagram

Inheritance diagram of Entry

efl.elementary.markup_to_utf8(string)
efl.elementary.utf8_to_markup(string)
class efl.elementary.Entry(Object parent, *args, **kwargs)

Bases: efl.elementary.__init__.LayoutClass

By default, entries are:

  • not scrolled
  • multi-line
  • word wrapped
  • autosave is enabled

Changed in version 1.8: Inherits from LayoutClass.

Parameters:
  • parent (efl.evas.Object) – The parent object
  • **kwargs – All the remaining keyword arguments are interpreted as properties of the instance
anchor_hover_end()

Ends the hover popup in the entry

When an anchor is clicked, the entry widget will create a hover object to use as a popup with user provided content. This function terminates this popup, returning the entry to its normal state.

anchor_hover_parent

Parent of the hover popup

The parent object to use by the hover created by the entry when an anchor is clicked. See Hover for more details on this.

Type:Object
anchor_hover_parent_get()
anchor_hover_parent_set(anchor_hover_parent)
anchor_hover_style

The style that the hover should use

When creating the popup hover, entry will request that it’s themed according to style.

Setting style to None means disabling automatic hover.

Seealso:style
Type:string
anchor_hover_style_get()
anchor_hover_style_set(style)
autocapital_type

Autocapitalization type on the immodule.

Type:Autocapitalization types

New in version 1.8.

autocapital_type_get()
autocapital_type_set(autocapital_type)
autosave

Whether the entry object ‘autosaves’ the loaded text file or not.

Type:bool
autosave_get()
autosave_set(autosave)
bounce

Deprecated since version 1.8: You should combine with Scrollable class instead.

bounce_get()

Deprecated since version 1.8: You should combine with Scrollable class instead.

bounce_set(h, v)

Deprecated since version 1.8: You should combine with Scrollable class instead.

calc_force()

Forces calculation of the entry size and text layouting.

This should be used after modifying the textblock object directly.

Seealso:textblock
callback_aborted_add(func, *args, **kwargs)

The enter key was pressed on a single line entry.

callback_aborted_del(func)
callback_activated_add(func, *args, **kwargs)

The enter key was pressed on a single line entry.

callback_activated_del(func)
callback_anchor_clicked_add(func, *args, **kwargs)

An anchor has been clicked. The event_info parameter for the callback will be an EntryAnchorInfo.

callback_anchor_clicked_del(func)
callback_anchor_down_add(func, *args, **kwargs)

Mouse button has been pressed on an anchor. The event_info parameter for the callback will be an EntryAnchorInfo.

callback_anchor_down_del(func)
callback_anchor_hover_opened_add(func, *args, **kwargs)
callback_anchor_hover_opened_del(func)
callback_anchor_in_add(func, *args, **kwargs)

Mouse cursor has moved into an anchor. The event_info parameter for the callback will be an EntryAnchorInfo.

callback_anchor_in_del(func)
callback_anchor_out_add(func, *args, **kwargs)

Mouse cursor has moved out of an anchor. The event_info parameter for the callback will be an EntryAnchorInfo.

callback_anchor_out_del(func)
callback_anchor_up_add(func, *args, **kwargs)

Mouse button has been unpressed on an anchor. The event_info parameter for the callback will be an EntryAnchorInfo.

callback_anchor_up_del(func)
callback_changed_add(func, *args, **kwargs)

The text within the entry was changed.

callback_changed_del(func)
callback_changed_user_add(func, *args, **kwargs)

The text within the entry was changed because of user interaction.

callback_changed_user_del(func)
callback_clicked_add(func, *args, **kwargs)

The entry has been clicked (mouse press and release).

callback_clicked_del(func)
callback_context_open_add(func, *args, **kwargs)

Called before showing the context menu.

New in version 1.15.

callback_context_open_del(func)
callback_cursor_changed_add(func, *args, **kwargs)

The cursor has changed position.

callback_cursor_changed_del(func)
callback_double_clicked_add(func, *args, **kwargs)

The entry has been double clicked.

callback_double_clicked_del(func)
callback_longpressed_add(func, *args, **kwargs)

A mouse button has been pressed and held for a couple seconds.

callback_longpressed_del(func)
callback_preedit_changed_add(func, *args, **kwargs)

The preedit string has changed.

callback_preedit_changed_del(func)
callback_press_add(func, *args, **kwargs)

A mouse button has been pressed on the entry.

callback_press_del(func)
callback_rejected_add(func, *args, **kwargs)

Called when some of inputs are rejected by the filter.

New in version 1.9.

callback_rejected_del(func)
callback_selection_changed_add(func, *args, **kwargs)

The current selection has changed.

callback_selection_changed_del(func)
callback_selection_cleared_add(func, *args, **kwargs)

The current selection has been cleared.

callback_selection_cleared_del(func)
callback_selection_copy_add(func, *args, **kwargs)

A copy of the selected text into the clipboard was requested.

callback_selection_copy_del(func)
callback_selection_cut_add(func, *args, **kwargs)

A cut of the selected text into the clipboard was requested.

callback_selection_cut_del(func)
callback_selection_paste_add(func, *args, **kwargs)

A paste of the clipboard contents was requested.

callback_selection_paste_del(func)
callback_selection_start_add(func, *args, **kwargs)

A selection has begun and no previous selection existed.

callback_selection_start_del(func)
callback_text_set_done_add(func, *args, **kwargs)

Whole text has been set to the entry.

callback_text_set_done_del(func)
callback_triple_clicked_add(func, *args, **kwargs)

The entry has been triple clicked.

callback_triple_clicked_del(func)
cnp_mode

Control pasting of text and images for the widget.

Normally the entry allows both text and images to be pasted. By setting cnp_mode to be ELM_CNP_MODE_NO_IMAGE, this prevents images from being copy or past. By setting cnp_mode to be ELM_CNP_MODE_PLAINTEXT, this remove all tags in text .

Note

This only changes the behaviour of text.

Type:Copy & paste modes
cnp_mode_get()
cnp_mode_set(mode)
cnp_selection_get(selection, format)

Retrieve data from a widget that has a selection.

Gets the current selection data from a widget.

See also

efl.elementary.object.Object.cnp_selection_get()

Parameters:
  • selection – Selection type for copying and pasting
  • format – Selection format
Return bool:

Whether getting cnp data is successful or not.

context_menu_clear()

This clears and frees the items in a entry’s contextual (longpress) menu.

context_menu_disabled

This disables the entry’s contextual (longpress) menu.

Type:bool
context_menu_disabled_get()
context_menu_disabled_set(disabled)
context_menu_item_add(label=None, icon_file=None, icon_type=enums.ELM_ICON_NONE, func=None, *args, **kwargs)

This adds an item to the entry’s contextual menu.

A longpress on an entry will make the contextual menu show up, if this hasn’t been disabled with context_menu_disabled. By default, this menu provides a few options like enabling selection mode, which is useful on embedded devices that need to be explicit about it, and when a selection exists it also shows the copy and cut actions.

With this function, developers can add other options to this menu to perform any action they deem necessary.

Parameters:
  • label (string) – The item’s text label
  • icon_file (string) – The item’s icon file
  • icon_type (string) – The item’s icon type
  • func (function) – The callback to execute when the item is clicked

New in version 1.8.

cursor_begin_set()

This moves the cursor to the beginning of the entry.

cursor_content_get()

Gets the character pointed by the cursor at its current position.

This function returns a string with the utf8 character stored at the current cursor position. Only the text is returned, any format that may exist will not be part of the return value.

Returns:The text pointed by the cursors.
Return type:unicode
cursor_down()

This moves the cursor one line down within the entry.

Returns:True upon success, False upon failure
Return type:bool
cursor_end_set()

This moves the cursor to the end of the entry.

cursor_geometry_get()

This function returns the geometry of the cursor.

It’s useful if you want to draw something on the cursor (or where it is), or for example in the case of scrolled entry where you want to show the cursor.

Returns:Geometry (x, y, w, h)
Return type:tuple of Evas_Coords (int) or None

Changed in version 1.8: Returns None when the cursor geometry cannot be fetched.

cursor_is_format_get()

Gets whether a format node exists at the current cursor position.

A format node is anything that defines how the text is rendered. It can be a visible format node, such as a line break or a paragraph separator, or an invisible one, such as bold begin or end tag. This function returns whether any format node exists at the current cursor position.

Seealso:cursor_is_visible_format_get()
Returns:True if the current cursor position contains a format node, False otherwise.
Return type:bool
cursor_is_visible_format_get()

Gets if the current cursor position holds a visible format node.

Seealso:cursor_is_format_get()
Returns:True if the current cursor is a visible format, False if it’s an invisible one or no format exists.
Return type:bool
cursor_line_begin_set()

This moves the cursor to the beginning of the current line.

cursor_line_end_set()

This moves the cursor to the end of the current line.

cursor_next()

This moves the cursor one place to the right within the entry.

Returns:True upon success, False upon failure
Return type:bool
cursor_pos

The cursor position in the entry

The value is the index of the character position within the contents of the string.

Type:int
cursor_pos_get()
cursor_pos_set(pos)
cursor_prev()

This moves the cursor one place to the left within the entry.

Returns:True upon success, False upon failure
Return type:bool
cursor_selection_begin()

This begins a selection within the entry as though the user were holding down the mouse button to make a selection.

cursor_selection_end()

This ends a selection within the entry as though the user had just released the mouse button while making a selection.

cursor_up()

This moves the cursor one line up within the entry.

Returns:True upon success, False upon failure
Return type:bool
editable

If the entry is to be editable or not.

By default, entries are editable and when focused, any text input by the user will be inserted at the current cursor position. Setting this as False will prevent the user from inputting text into the entry.

The only way to change the text of a non-editable entry is to use text, entry_insert() and other related functions and properties.

Type:bool
editable_get()
editable_set(editable)
end_visible

Sets the visibility of the end widget of the entry, set by Entry.part_content_set("end", content).

Type:bool

New in version 1.8.

end_visible_set(setting)
entry

The text displayed within the entry to entry.

Note

Setting this bypasses text filters

Type:string
entry_append(text)

Appends entry to the text of the entry.

Adds the text in entry to the end of any text already present in the widget.

The appended text is subject to any filters set for the widget.

Seealso:markup_filter_append()
Parameters:entry (string) – The text to be displayed
entry_get()
entry_insert(entry)

Inserts the given text into the entry at the current cursor position.

This inserts text at the cursor position as if it was typed by the user (note that this also allows markup which a user can’t just “type” as it would be converted to escaped text, so this call can be used to insert things like emoticon items or bold push/pop tags, other font and color change tags etc.)

If any selection exists, it will be replaced by the inserted text.

The inserted text is subject to any filters set for the widget.

Seealso:markup_filter_append()
Parameters:entry (string) – The text to insert
entry_set(entry)
file

The file for the text to display and then edit.

All changes are written back to the file after a short delay if the entry object is set to autosave (which is the default).

If the entry had any other file set previously, any changes made to it will be saved if the autosave feature is enabled, otherwise, the file will be silently discarded and any non-saved changes will be lost.

Type:(unicode file_name, Text format file_format)
Raises:RuntimeError – when setting the file fails

Changed in version 1.8: Raise RuntimeError when setting the file fails, instead of returning a bool.

file_get()
file_save()

This function writes any changes made to the file set with file.

file_set(file_name, file_format)
file_text_format

The text format used to load and save the file

Text format can be plain text or markup text.

Default is ELM_TEXT_FORMAT_PLAIN_UTF8, if you want to use ELM_TEXT_FORMAT_MARKUP_UTF8 then you need to set the text format before calling file or file_set().

You could also set it before a call to file_save() in order to save with the given format.

Type:Text format (write only)

New in version 1.18.

file_text_format_set(format)
icon_visible

Sets the visibility of the end widget of the entry, set by Entry.part_content_set("icon", content).

Type:bool
icon_visible_set(visible)
imf_context_reset()

Reset the input method context of the entry if needed.

This can be necessary in the case where modifying the buffer would confuse on-going input method behavior. This will typically cause the Input Method Context to clear the preedit state.

input_hint

The input hint which allows input methods to fine-tune their behavior.

Type:Input Hints

New in version 1.12.

input_hint_get()
input_hint_set(hints)
input_panel_enabled

Whether to show the input panel automatically or not.

Type:bool
input_panel_enabled_get()
input_panel_enabled_set(enabled)
input_panel_hide()

Hide the input panel (virtual keyboard).

Note that input panel is shown or hidden automatically according to the focus state of entry widget. This API can be used in the case of manually controlling by using Entry.input_panel_enabled_set = False.

input_panel_language

The language mode of the input panel.

This API can be used if you want to show the alphabet keyboard mode.

Type:Input panel language sort order
input_panel_language_get()
input_panel_language_set(lang)
input_panel_layout

The input panel layout of the entry

Type:Input panel layouts
input_panel_layout_get()
input_panel_layout_set(layout)
input_panel_layout_variation

Input panel layout variation of the entry

Type:int

New in version 1.8.

input_panel_layout_variation_get()
input_panel_layout_variation_set(variation)
input_panel_return_key_autoenabled

Set whether the return key on the input panel is disabled automatically when entry has no text.

If enabled is True, The return key on input panel is disabled when the entry has no text. The return key on the input panel is automatically enabled when the entry has text. The default value is False.

Type:bool
input_panel_return_key_autoenabled_set(enabled)
input_panel_return_key_disabled

Whether the return key on the input panel is disabled or not.

Type:bool
input_panel_return_key_disabled_get()
input_panel_return_key_disabled_set(disabled)
input_panel_return_key_type

The “return” key type. This type is used to set string or icon on the “return” key of the input panel.

An input panel displays the string or icon associated with this type

Type:Input panel return key modes
input_panel_return_key_type_get()
input_panel_return_key_type_set(return_key_type)
input_panel_show()

Show the input panel (virtual keyboard) based on the input panel property of entry such as layout, autocapital types, and so on.

Note that input panel is shown or hidden automatically according to the focus state of entry widget. This API can be used in the case of manually controlling by using Entry.input_panel_enabled = False.

input_panel_show_on_demand

Input panel show on demand.

Set the attribute to show the input panel in case of only an user’s explicit Mouse Up event.

Type:bool

New in version 1.9.

input_panel_show_on_demand_get()
input_panel_show_on_demand_set(ondemand)
is_empty

Gets whether the entry is empty.

Empty means no text at all. If there are any markup tags, like an item tag for which no provider finds anything, and no text is displayed, this function still returns False.

Type:bool
line_wrap

The line wrap type to use on multi-line entries.

This tells how the text will be implicitly cut into a new line (without inserting a line break or paragraph separator) when it reaches the far edge of the widget.

Note that this only makes sense for multi-line entries. A widget set to be single line will never wrap.

Type:Wrap mode
line_wrap_get()
line_wrap_set(wrap)
markup_filter_append(func, data=None)

Append a markup filter function for text inserted in the entry

Append the given callback to the list. This functions will be called whenever any text is inserted into the entry, with the text to be inserted as a parameter. The type of given text is always markup. The callback function is free to alter the text in any way it wants. If the new text is to be discarded, the function can return None. This will also prevent any following filters from being called.

Parameters:
  • func – The function to use as text filter
  • data – User data to pass to func

New in version 1.8.

markup_filter_prepend(func, data=None)

Prepend a markup filter function for text inserted in the entry

Prepend the given callback to the list. See markup_filter_append() for more information

Parameters:
  • func – The function to use as text filter
  • data – User data to pass to func

New in version 1.8.

markup_filter_remove(func, data=None)

Remove a markup filter from the list

Removes the given callback from the filter list. See markup_filter_append() for more information

Parameters:
  • func – The filter function to remove
  • data – The user data passed when adding the function

New in version 1.8.

markup_to_utf8(string)

Deprecated since version 1.8: Use the module level markup_to_utf8() method instead.

password

Sets the entry to password mode.

In password mode, entries are implicitly single line and the display of any text in them is replaced with asterisks (*).

Type:bool
password_get()
password_set(password)
prediction_allow

Whether the entry should allow to use the text prediction.

Type:bool
prediction_allow_get()
prediction_allow_set(allow)
scrollable

Enable or disable scrolling in entry

Normally the entry is not scrollable.

Type:bool
scrollable_get()
scrollable_set(scrollable)
scrollbar_policy

Deprecated since version 1.8: You should combine with Scrollable class instead.

scrollbar_policy_get()

Deprecated since version 1.8: You should combine with Scrollable class instead.

scrollbar_policy_set(policy_h, policy_v)

Deprecated since version 1.8: You should combine with Scrollable class instead.

select_all()

This selects all text within the entry.

select_allow

Whether selection in the entry is allowed.

Type:bool

New in version 1.18.

select_allow_get()
select_allow_set(allow)
select_none()

This drops any existing text selection within the entry.

select_region

The selected region within the entry.

Type:2 ints tuple (start, end)
select_region_get()

Get the current position of the selection cursors in the entry.

Returns:the 2 ints tuple (start, end)
Return type:tuple
select_region_set(start, end)

This selects a region of text within the entry.

Parameters:
  • start (int) – The starting position
  • end (int) – The ending position
selection

Gets any selected text within the entry.

If there’s any selected text in the entry, this function returns it as a string in markup format. None is returned if no selection exists or if an error occurred.

Type:string
selection_copy()

This executes a “copy” action on the selected text in the entry.

selection_cut()

This executes a “cut” action on the selected text in the entry.

selection_get()
selection_paste()

This executes a “paste” action in the entry.

single_line

Single line mode.

In single line mode, entries don’t ever wrap when the text reaches the edge, and instead they keep growing horizontally. Pressing the Enter key will generate an "activate" event instead of adding a new line.

When single_line is False, line wrapping takes effect again and pressing enter will break the text into a different line without generating any events.

Type:bool
single_line_get()
single_line_set(single_line)
text_style_user_peek()

Retrieve the style on the top of user style stack.

Return string:style on the top of user style stack if exist, otherwise None.
Seealso:text_style_user_push()

New in version 1.8.

text_style_user_pop()

Remove the style in the top of user style stack.

Seealso:text_style_user_push()

New in version 1.8.

text_style_user_push(style)

Push the style to the top of user style stack.

If there is styles in the user style stack, the properties in the top style of user style stack will replace the properties in current theme. The input style is specified in format:

tag='property=value'

i.e.:

DEFAULT='font=Sans font_size=60' hilight=' + font_weight=Bold'
Parameters:style (string) – The style user to push

New in version 1.8.

textblock

Returns the actual textblock object of the entry.

This function exposes the internal textblock object that actually contains and draws the text. This should be used for low-level manipulations that are otherwise not possible.

Changing the textblock directly from here will not notify edje/elm to recalculate the textblock size automatically, so any modifications done to the textblock returned by this function should be followed by a call to calc_force().

The return value is marked as const as an additional warning. One should not use the returned object with any of the generic evas functions (geometry_get/resize/move and etc), but only with the textblock functions; The former will either not work at all, or break the correct functionality.

Warning

Many functions may change (i.e delete and create a new one) the internal textblock object. Do NOT cache the returned object, and try not to mix calls on this object with regular elm_entry calls (which may change the internal textblock object). This applies to all cursors returned from textblock calls, and all the other derivative values.

Type:Textblock
textblock_get()
utf8_to_markup(string)

Deprecated since version 1.8: Use the module level utf8_to_markup() method instead.

class efl.elementary.EntryContextMenuItem(...)

Bases: object

New in version 1.8.

icon

Get the icon object of the contextual menu item.

Type:(unicode icon_file, unicode icon_group, Icon type icon_type)

New in version 1.8.

label

Get the text of the contextual menu item.

Type:unicode

New in version 1.8.

class efl.elementary.FilterLimitSize

Bases: object

entry filter.

max_byte_count

The maximum number of bytes allowed.

Type:int
max_char_count

The maximum number of characters allowed.

Type:int
class efl.elementary.FilterAcceptSet

Bases: object

entry filter.

accepted

Set of characters accepted in the entry.

Type:string
rejected

Set of characters rejected from the entry.

Type:string
class efl.elementary.EntryAnchorInfo(...)

Bases: object

by entries.

name

The name of the anchor, as stated in its href.

Type:string
button

The mouse button used to click on it.

Type:Button
x

Anchor geometry, relative to canvas.

Type:int
y

Anchor geometry, relative to canvas.

Type:int
w

Anchor geometry, relative to canvas.

Type:int
h

Anchor geometry, relative to canvas.

Type:int
class efl.elementary.EntryAnchorHoverInfo(...)

Bases: object

by the entries.

anchor_info

The actual anchor info.

Type:EntryAnchorInfo
hover

The hover object to use for the popup.

Type:Hover
hover_parent

The object used as parent by the hover.

Type:Eo
hover_left

Hint indicating if there’s space for content on the left side of the hover.

Type:bool
hover_right

Hint indicating content fits on the right side of the hover.

Type:bool
hover_top

Hint indicating content fits on top of the hover.

Type:bool
hover_bottom

Hint indicating content fits below the hover.

Type:bool