Button¶
Widget description¶
This is a push-button. Press it and run some function. It can contain a simple label and icon object and it also has an autorepeat feature.
Available styles¶
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
Internally used byHoversel
to give a continuous look across its options.hoversel_vertical_entry
Another internal forHoversel
.naviframe
Internally used byNaviframe
for its back button.colorselector
Internally used byColorselector
for its left and right buttons.
Layout content parts¶
icon
- An icon of the button
Layout text parts¶
default
- Label of the button
Emitted signals¶
clicked
: the user clicked the button (press/release).repeated
: the user pressed the button without releasing it.pressed
: button was pressed.unpressed
: button was released after being pressed.
Inheritance diagram¶
- class efl.elementary.Button(Object parent, *args, **kwargs)¶
Bases:
efl.elementary.__init__.LayoutClass
This is the class that actually implements the widget.
- Parameters
parent (
efl.evas.Object
) – The parent object**kwargs – All the remaining keyword arguments are interpreted as properties of the instance
- autorepeat¶
Turn on/off the autorepeat event generated when the button is kept pressed
When off, no autorepeat is performed and buttons emit a normal
clicked
signal when they are clicked.When on, keeping a button pressed will continuously emit a
repeated
signal until the button is released. The time it takes until it starts emitting the signal is given byautorepeat_initial_timeout
, and the time between each new emission byautorepeat_gap_timeout
.- Type
bool
- autorepeat_gap_timeout¶
The interval between each generated autorepeat event
After the first
repeated
event is fired, all subsequent ones will follow after a delay oft
seconds for each.See also
- Type
float
- autorepeat_gap_timeout_get()¶
- autorepeat_gap_timeout_set(t)¶
- autorepeat_get()¶
- autorepeat_initial_timeout¶
The initial timeout before the autorepeat event is generated
Reflects the timeout, in seconds, since the button is pressed until the first
repeated
signal is emitted. Ift
is 0.0 or less, there won’t be any delay and the event will be fired the moment the button is pressed.See also
- Type
float
- autorepeat_initial_timeout_get()¶
- autorepeat_initial_timeout_set(t)¶
- autorepeat_set(on)¶
- callback_clicked_add(func, *args, **kwargs)¶
The user clicked the button (press/release).
- callback_clicked_del(func)¶
- callback_pressed_add(func, *args, **kwargs)¶
The button was pressed.
- callback_pressed_del(func)¶
- callback_repeated_add(func, *args, **kwargs)¶
The user pressed the button without releasing it.
- callback_repeated_del(func)¶
- callback_unpressed_add(func, *args, **kwargs)¶
The button was released after being pressed.
- callback_unpressed_del(func)¶