MultiButtonEntry

../_images/multibuttonentry-preview.png

Widget description

A Multibuttonentry is a widget to allow a user enter text and manage it as a number of buttons. Each text button is inserted by pressing the “return” key. If there is no space in the current row, a new button is added to the next row. When a text button is pressed, it will become focused. Backspace removes the focus. When the Multibuttonentry loses focus items longer than one line are shrunk to one line.

Typical use case of multibuttonentry is, composing emails/messages to a group of addresses, each of which is an item that can be clicked for further actions.

Emitted signals

  • item,selected - this is called when an item is selected by api, user interaction, and etc. this is also called when a user press back space while cursor is on the first field of entry. event_info contains the item.
  • item,added - when a new multi-button entry item is added. event_info contains the item.
  • item,deleted - when a multi-button entry item is deleted. event_info contains the item.
  • item,clicked - this is called when an item is clicked by user interaction. Both “item,selected” and “item,clicked” are needed. event_info contains the item.
  • clicked - when multi-button entry is clicked.
  • focused - when multi-button entry is focused.
  • unfocused - when multi-button entry is unfocused.
  • expanded - when multi-button entry is expanded.
  • contracted - when multi-button entry is contracted.
  • expand,state,changed - when shrink mode state of multi-button entry is changed.

Layout text parts

  • default - A label of the multibuttonentry
  • default - A label of the multibuttonentry item

Inheritance diagram

Inheritance diagram of MultiButtonEntry

class efl.elementary.MultiButtonEntry(Object parent, *args, **kwargs)

Bases: efl.elementary.__init__.Object

Parameters:
  • parent (efl.evas.Object) – The parent object
  • **kwargs – All the remaining keyword arguments are interpreted as properties of the instance
callback_clicked_add(func, *args, **kwargs)
callback_clicked_del(func)
callback_contracted_add(func, *args, **kwargs)
callback_contracted_del(func)
callback_expand_state_changed_add(func, *args, **kwargs)
callback_expand_state_changed_del(func)
callback_expanded_add(func, *args, **kwargs)
callback_expanded_del(func)
callback_focused_add(func, *args, **kwargs)
callback_focused_del(func)
callback_item_added_add(func, *args, **kwargs)
callback_item_added_del(func)
callback_item_clicked_add(func, *args, **kwargs)
callback_item_clicked_del(func)
callback_item_deleted_add(func, *args, **kwargs)
callback_item_deleted_del(func)
callback_item_longpressed_add(func, *args, **kwargs)

New in version 1.14.

callback_item_longpressed_del(func)

New in version 1.14.

callback_item_selected_add(func, *args, **kwargs)
callback_item_selected_del(func)
callback_unfocused_add(func, *args, **kwargs)
callback_unfocused_del(func)
clear()
editable

Whether the multibuttonentry is to be editable or not.

Type:bool

New in version 1.8.

editable_get()
editable_set(editable)
entry

The Entry object child of the multibuttonentry.

Type:Entry
entry_get()
expanded

The expanded state of the multibuttonentry.

Type:bool
expanded_get()
expanded_set(enabled)
filter_append(func, *args, **kwargs)
filter_prepend(func, *args, **kwargs)
first_item_get()
format_function_set(func, *args, **kwargs)

Set a function to format the string that will be used to display the hidden items counter.

Parameters:func (callable) – The actual format function. signature: (int count, args, kwargs)->string

Note

Setting func to None will restore the default format.

New in version 1.9.

item_append(label, func=None, *args, **kwargs)
item_insert_after(after, label, func=None, *args, **kwargs)
item_insert_before(before, label, func=None, *args, **kwargs)
item_prepend(label, func=None, *args, **kwargs)
items_get()
last_item_get()
selected_item_get()
class efl.elementary.MultiButtonEntryItem(label=None, callback=None, cb_data=None, *args, **kargs)

Bases: efl.elementary.__init__.ObjectItem

append_to(mbe)
insert_after(after)
insert_before(before)
next_get()
prepend_to(mbe)
prev_get()
selected_get()
selected_set(selected)