语言

Menu
Sites
Language
Button background

How can I change a button's background?

Is there any 'c function' for changing button background other than using styles in edc?

响应

3 回复
Alex Dem

Hi,
No, I did not face such api. Looks like no simple way to set background. Only predefined styles could be set:
https://developer.tizen.org/dev-guide/2.3.1/org.tizen.guides/html/native/ui/styles_mn.htm
or here is example https://developer.tizen.org/dev-guide/2.3.1/org.tizen.guides/html/native/ui/component_button_mn.htm
Alexey.

Alex Dem

To customize button you should perform something like this:
https://developer.tizen.org/dev-guide/2.3.1/org.tizen.sampledescriptions/html/mobile_n/ui_theme_extension_sd_mn.h
But this is quite time-consuming process. You should take source of button and redefine it fully in some edc file. It will be your "customized" theme which could be set with  elm_object_style_set(btn,"customized");
also you will need to add your new custom style name with
elm_theme_extension_add
Alexey

Alex Dem

Hi,
fyi: here is also links to button sources
https://developer.tizen.org/ko/forums/native-application-development/where-definition-small-and-medium-button.edc
Alexey.