Button - EFL / Elementary Foundation Libraries

Saturday, March 7, 2026

Description

This is a push-button. Press it and run some function. Button can have text, icon and text, or icon only. This widget inherits from the Layout widget. So that all the functions acting on Layout widget also work for Button widget.

Default content parts of the button widget that you can use for are:

"icon"
An icon of the button

Default text parts of the button widget that you can use for are:

"default"
A label of the button

Screenshots

Examples

TODO:

Heirarchy

TODO: Create inverted heirarchy diagram.

Signals

clicked
Emitted when button is clicked (pressed and released).

pressed
Emitted when `button` is pressed.

unpressed
Emitted when `button` is released after being pressed.

focused (since 1.8)
Emitted when `button` has received focus.

unfocused (since 1.8)
Emitted when button has lost focus.

repeated
Emitted when button is pressed without releasing it.

Following are the signals inherited from Layout widgets.

"theme,changed"
Emitted when theme is changed.

"language,changed"
Emitted when application's language changed.

Styles

Defined in the default theme, the button has the following styles available:

default
A normal button.

anchor
Like default, but the button fades away when the mouse is not over it, leaving only the text or icon.

hoversel_vertical (internal)
Internally used by Hoversel to give a continuous look across its options.

hoversel_vertical_entry (internal)
Another internal for Hoversel.

naviframe (internal)
Internally used by Elm_Naviframe for its back button.

colorselector (internal)
Internally used by Colorselector for its left and right buttons.

Constructors

elm_button_add
Add a new button to the parent's canvas.

Functions

elm_button_autorepeat_initial_timeout_set
Sets the initial timeout before the autorepeat event is generated.

elm_button_autorepeat_initial_timeout_get
Gets the initial timeout before the autorepeat event is generated.

elm_button_autorepeat_gap_timeout_set
Sets the interval between each generated autorepeat event.

elm_button_autorepeat_gap_timeout_get
Gets the interval between each generated autorepeat event.

elm_button_autorepeat_set
Sets the autorepeat event generated when the button is kept pressed.

elm_button_autorepeat_get
Gets the autorepeat event generated when the button is kept pressed.

Following are the functions inherited from the Container class.

elm_object_part_text_set
Sets the text of an object.

elm_object_part_text_get
Gets the text of an object.

elm_object_part_content_set
Set the content on part of a given container widget.

elm_object_part_content_get
Get the content on part of a given container widget.

elm_object_part_content_unset
Unsets the content on a part of a given container widget.

elm_object_signal_emit
Sends the signal to the widget.

elm_object_signal_callback_add
Adds the callback for a signal emitted by widget.

elm_object_signal_callback_del
Removes a signal-triggered callback from a widget.

---