Table of Contents

Widgets Menu


Label Widgets

The label widget displays text with simple html-like markup.

Table of Contents

Adding a Label

To add a label and set the text in it, use the following functions.

Evas_Object *label = elm_label_add(win);
elm_object_text_set(label, "Some long text for our label, that is not so long");

Using Label Styles

Label displays the text with several predefined styles.

Here we set the style to “slide_long”.

elm_object_style_set(label, "slide_long");

Configuring the Label

The duration of the animation and the slide mode can be set.

elm_label_slide_duration_set(label, 3);
elm_label_slide_mode_set(label, ELM_LABEL_SLIDE_MODE_ALWAYS);

The style can be modified.

elm_object_style_set(label, "slide_bounce");

Using Label Callbacks

This widget emits the following signals, besides the ones sent from Layout:

Here we register a callback on the “slide,end” signal.

evas_object_smart_callback_add(label, "slide,end", _slide_end_cb, data);
// Callback function for the "slide,end" signal
// This callback is called when the label slide reaches the end
static void
_slide_end_cb(void *data, Evas_Object *obj, void *event_info)
{
   printf("Slide has reach the end.\n");
}


A Label Example


Widgets Menu