语言

Menu
Sites
Language
Text with shadow style

Hello!


How can I add shadow text to entry widged?
There is EVAS _TEXTSTYLE_SHADOW for Evas text object.
Is there any way create same style for text block object and set it to entry (as there is elm_entry_textblock_get() function)


Thanks in advance for any help

 

 

响应

8 回复
Alex Ashirov

Hello,

I am not sure that it's exactly what you are looking for but you can take a look at evas_textblock_style_set() function.

Mazhara

I have tried use this function, but now effect appear. Maybe I use it wrong.... Here is part of code i used for this...

ad->input_field_entry = elm_entry_add(table);
    	elm_object_part_text_set(ad->input_field_entry, "elm.guide", "Enter Text");
		Evas_Object *textblock = elm_entry_textblock_get (ad->input_field_entry);
		    evas_object_textblock_text_markup_set(textblock, "This is a test string");
		    static const char *style_buf =
		    		"DEFAULT='font=Sans font_size=30 style=shadow color=#F00 text_class=entry align=center shadow_color=#00F'";
		     Evas_Textblock_Style *txt_style= evas_textblock_style_new();
		     evas_textblock_style_set(txt_style, style_buf);
		     evas_object_textblock_style_set(textblock, txt_style);
		     elm_entry_calc_force (ad->input_field_entry);

 

Alex Ashirov

Hello,

Probably you need to call evas_object_show(textblock); after the style is changed.

Mazhara

Hi.

It didn't help. >_<

I think it should redraw when 

evas_object_show(ad->input_field_entry);

occured. But is nothing changed >_< Even color of text( 

Alex Dem

Hi,
Your way looks logical. Unfortunatelly there is no clear examples in 2.3.0 dev-guide (against 2.2.1). I tried to update Evas_Object also but I could not do it.
Alexey.

Mazhara
evas_object_textblock_style_user_push (Evas_Object *obj, Evas_Textblock_Style *ts)

worked for me. Thanks for help)

colin Rao

As the style code,

static const char *style_buf =
    	    		"DEFAULT='font=Sans font_size=30 style=shadow color=#F00 text_class=entry align=center shadow_color=#00F'";

I want to know the whole list of supported style property, such as the font, font_size, color, etc. Is there a border/backgroud/... properties. Anybody can supply the related documents? Thanks! -_-

Alex Ashirov