[英]How to add background to elementary(EFL) widget?
我想要背景色(或圖像)到基本小部件(也包括容器),例如網格或框。
如何為基本小部件設置背景顏色?
在EFL基本文檔中,我找到了elm_bg函數,但無法將其設置為其他基本容器的背景...
使用elm_table小部件。 通過使用表格,可以將多個對象打包到同一位置。
謝謝。
在tizen.org上也被問到,這部分顯然還不清楚
主題化是方法,在先前的URL上共享示例代碼。
Evas_Object *bg = elm_bg_add(parent);
// Set a color
elm_bg_color_set(bg, 64, 127, 256);
// Set a background image
elm_bg_file_set(bg, "/path/to/the/image", NULL);
// Create your grid or box component with the background as parent
Evas_object *box = elm_box_add(bg);
/* Load content at the topmost layer of the background */
/* Note that the background has a swallow part and there is where our box will go */
elm_object_content_set(bg, box);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.