语言

Menu
Sites
Language
Context menu item

Hello,

I am using Context popup widget in my app.

Is it possible to add two-line text to menu item?

I add context menu by

elm_ctxpopup_add(...);

and menu item by:

elm_ctxpopup_item_append (Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data)

Thanks

响应

2 回复
Jin Yoon

I've checked elm_ctx_popup on the repository of efl-them-tizen.

elm_ctx_popup uses the TEXT part for elm.text as below.

 

part {
name: "elm.text";
type:  TEXT;
mouse_events:  0;
scale: 1;
description {
state: "default" 0.0;
min: 1 CTXPOPUP_IE_ITEM_HEIGHT_INC;
max: (CTXPOPUP_IE_CONTENT_WIDTH_MAX_INC-(3*CTXPOPUP_IE_ITEM_PADDING_INC)-CTXPOPUP_IE_ICON_WIDTH_INC) CTXPOPUP_IE_ITEM_HEIGHT_INC;
fixed: 0 1;
align: 0.5 0.5;
rel1 {relative: 1.0 0.0; to_x: "icon_right_padding";}
rel2 {relative: 0.0 1.0; to_x: "text_right_padding";}
color: CTXPOPUP_IE_FONT_COLOR;
text {
font: "SLP:style=Medium";
size: CTXPOPUP_IE_FONT_SIZE_INC;
align: 0.0 0.5;
min: 1 1;
text_class: "list_item";
}
}
description {
state: "clicked" 0.0;
inherit: "default" 0.0;
color: CTXPOPUP_IE_CLICKED_FONT_COLOR;
}
}

I think the TEXT part cannot have multiline.

 

Best regards, Jin.

Jean Yang

Hi, 

I have try the format code <br> test<br> in the code, but still can't break to 2 line, seems this TEXT can't have multiline as Jin said.

elm_ctxpopup_item_append(ctxpopup, "Mes<br>sage</br>", NULL, ctxpopup_item_select_cb, NULL);