Languages

Menu
Sites
Language
Create custom UI control

Hi,

How to create custom UI controls?  I want to note that using existing containers and EDJE is NOT an option since I need the new control to have some very specific behaviour. Looks like EFL allows to create custom controls but for some reasons API that is needed for a new controls creation ( like evas_object_smart_clipped_class_get or evas_smart_class_new ) is not available for TIZEN. I'll appreciate any help

Responses

1 Replies
Masum Talukder

Hello,

Usually, Tizen UI controls use default behaviour provided by Tizen UI Framework. However, UI controls can be customized using custom style. 

In that case, you need to write a custom style (edc group) in EDC file. Later, this group needs to be added as style of that control using elm_object_style_set() api. 

For example, if your group(style) name is MY_STYLE, then after adding elm object, you need to set corresponding style. Like -

btn = elm_button_add(parent); 
elm_object_style_set(btn, "MY_STYLE"); 

In your style file, you can add/modify control's UI style, events etc. 

Further Reference: 

https://developer.tizen.org/dev-guide/2.4/org.tizen.ui.practices/html/native/efl/component_custom_n.htm 

https://developer.tizen.org/community/code-snippet/native-code-snippet/custom-elmbutton

 

If you find my post helpful for you, please mark it as the Best Answer to promote this post to others.