Languages

Menu
Sites
Language
Create an entry widget with underline

Hi All,

I want to create an entry (TextBox) with underline.

How can we do that using .edc ?

Responses

6 Replies
colin Rao

f.y.i.

https://docs.enlightenment.org/efl/1.15.0/edcref.html

pius lee

Use style with TEXTBLOCK in your .edc

collections {
   group { name: "main";
      
      styles {
         style { name: "text_style";
            base: "font=Sans color=#f00 font_size=40 underline=single underline_color=#0000ff align=center valign=middle";
         }
      }
      
      parts {
         part { name: "txt_title";
            type: TEXTBLOCK;
            description { state: "default" 0.0;
               text { 
                  style: "text_style";
                  min: 1 1; 
                  ellipsis: -1;
                  text: "Foobar";
               }
               color: 255 0 0 255;
            }
         }
      }
   }
}

You can refer style element from here.

https://docs.enlightenment.org/auto/eet/evas_textblock_style_page.html#evas_textblock_style_valign

PS ) You Must do set "font", You can not see text until set it.

 

Alex Dem

Hi 
fyi: simplest way without edc, you could use something like this:

    const char *user_style = "DEFAULT='color=#AAA underline=single underline_color=#AAA'";
    elm_entry_text_style_user_push  ( entry,user_style);

Alexey.

Alex Dem

You could look also here:
https://developer.tizen.org/dev-guide/2.3.0/org.tizen.native.mobile.apireference/group__Evas__Object__Textblock.html#textblock_paragraphs
Alexey.

Dharmesh Guna

Thank you All for your suggestions.

Sorry for the confusion in my question.

I was looking for entry widget style. My question was not about underlining text but rather I wanted border-bottom in entry widget.

I temporarily achieved my purpose using .edc with underline image. I will add animation program in .edc in future to change underline image for focused entry and unfocused entry state.

Thank you!!

 

pius lee

Yup, You are going right way.

You can make bottom border with thin rectangle under textbox in EDC. but It's not flexible.

If you want change a line to some other (like flower decoration or other images), Eventually you would be edit it to image again.