语言

Menu
Sites
Language
Set text background color in Labels

Hello to all,

   I have a problem, I set a background image in my app that dont allow to read the text in the labels, because the image is dark and the font are dark too (well I can set the font white but is not elegant) I want a set label background to white, to have a white frame with the text inside, I didnt found nothing in the documentation, anybody knows how? Thanks!

查看选择的答案

响应

2 回复
Mark as answer
Shaswati Saha

I've tried to do the same thing but couldn't manage any direct way. You may try a workaround to implement this. Please go through this link. Here's an example which is almost related to the similar thing you're trying to do. Have a look into the create_bubble_table() function of the sample. The workaround is, the button style is set to transparent and the background color is set upon that. Finally the labels and button is kept in the table container.  

If you try this without the below lines of code, then it'll serve your purpose and make it feel like the color of labels are changed not the buttons. I would like to suggest you to try the workaround.

evas_object_event_callback_add(button, EVAS_CALLBACK_MOUSE_DOWN, bubble_button_mouse_down_cb, bg);
evas_object_event_callback_add(button, EVAS_CALLBACK_MOUSE_UP, bubble_button_mouse_up_cb, bg);

 

Carlos Dominguez

Thanks a lot!