语言

Menu
Sites
Language
How to set entry style?

Hi,

I want to customize the EFL entry widget's style, such as the border, background color. 

I am try to do this in .edc file, as below:

        part {
            name: "id_entry";
            type: SWALLOW;
            scale: 1;
            description {
                state: "default" 0.0; 
                rel1 { relative: 1.0 0.0; to: "id_label"; offset: 20 0; }
                rel2 { relative: 3.0 1.0; to: "id_label"; offset: 20 0; }
                color: 173 170 165 255;
            }
        }
    entry = elm_entry_add(parent);
	elm_entry_scrollable_set(entry, EINA_TRUE);
	eext_entry_selection_back_event_allow_set(entry, EINA_TRUE);
	evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
	evas_object_smart_callback_add(entry, "changed", entry_changed_cb, NULL);
	elm_object_part_content_set(layout, "id_entry", entry);

Seems this color setting is for the text but not the backgroud. Also, I want to set its border width and color, how to do it?

 

响应

3 回复
Anup

Hi,

For customizing EFL widget you can follow this guide.

https://developer.tizen.org/dev-guide/2.3.0/org.tizen.mobile.native.appprogramming/html/guide/ui/widgets_customization_guide.htm

There is also one sample application in SDK named 'Theme extension UI sample application', you can also check that.

You will also need the edc theme file of entry. I checked the source and found this. 

https://review.tizen.org/git/?p=platform/core/uifw/efl-theme-tizen.git;a=blob;f=themes/widgets/entry.edc;h=3d975db0746cf03f1a154330f28216f7e1628d03;hb=583598df2aeb21a296cacbbbfffdff14ae595d7f

 

 

 

colin Rao

Hi, thanks for your response.

I am very glad to study its default layout setting, such as its default .edc file, that's can let me to know its whole theme/style configure, and I can do some specific customize configuration base on its default theme/style. 

colin Rao

Maybe this help doc can help on this issue. I'll try it later. https://developer.tizen.org/dev-guide/2.3.0/org.tizen.mobile.native.apireference/group__Evas__Object__Textblock.html

Post here for other guys F.Y.I.