언어 설정

Menu
Sites
Language
elm_entry text color change not working

Hi All,

I am trying to change the text color for an "entry" evas object like so:

    elm_entry_text_style_user_push(entry, "DEFAULT='font=Tizen font_size=40 color=#E0FFFF align=center'");

However it is not having any effect. I want to be able to customise the text color to the cyan tizen color. 

From this link it says,

  • color: The text color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", or "#RGBA".

Similarly, setting 'backing=on and backing_color=#00FFFF' in style to have a background color show does not have any effect. What am I doing wrong?

 

Responses

2 댓글
Armaan-Ul- Islam

Hello, elm_entry_text_style_user_push() function is working fine on my device.

Code snippet:

        /* Layout */
        layout = elm_layout_add(box);
	elm_layout_file_set(layout, ELM_DEMO_EDJ, "entry_layout");
	evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, 0.0);
	evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, 0.0);

	/* Entry */
	entry = elm_entry_add(layout);
	eext_entry_selection_back_event_allow_set(entry, EINA_TRUE);
	elm_object_part_content_set(layout, "entry_part", entry);
	elm_entry_text_style_user_push(entry, "DEFAULT='font=Tizen:style=Light font_size=50 color=#f00 align=center'");    //red color

	elm_box_pack_end(box, layout);
	evas_object_show(layout);

 

 Screenshot:

                            

 

Their is a chance some other part of your code is resulting the conflict. Anyways, You may like to copy sample code from:

New > Sample > Mobile > Native > UI > UI Components 

then

src > entry.c

then compare the code for elm_entry.

For details implementation you may have already checked Entry API.

Armaan-Ul- Islam

Hello, Is the code sample working on your device ? Or have you found any workaround ?