Languages

Menu
Sites
Language
How can I set the alignment of label in genlist

Hello,

In wearable devices, the default alignment of label in genlist is "center".

When I set the genlist below code,

itc->item_style = "1text.1icon";
itc->func.text_get = _gl_text_get;
itc->func.content_get = _gl_icon_get;
itc->func.del = _gl_menu_del;

eventough the alignment is set left using tag, the labels not align to left.

It looks like that the size of label in genlist are fit for text.

static char *
_gl_text_get(void *data, Evas_Object *obj, const char *part)
{
    if (strcmp(part, "elm.text")) return NULL;
    char buf[1024];
    item_data *id = (item_data *)data;
    int index = id->index;
    snprintf(buf, 1023, "<align=left>%s</align>", text[index]);
    return strdup(buf);
}

So, I hope that setting alignment of label. How can I get the labels in genlist?

Thank you.

Edited by: Kim on 04 Sep, 2015

Responses

2 Replies
colin Rao

Hi, I am afraid that you cant change the alignment by align tag. Seems the alignment setting is defined in the genlist item style, in the default .edc file of genlist. 

Palitsyna

Hello,

as far as I know, there is no opportunity to set the alignment of label in genlist.