【发布时间】:2014-07-14 06:17:32
【问题描述】:
我想要基本小部件(也是容器)的背景颜色(或图像),如网格或框。
如何为基本小部件设置背景颜色?
在 EFL 基本文档中,我找到了 elm_bg 函数,但我无法将其设置为其他基本容器的背景...
【问题讨论】:
标签: widget background-image tizen efl elementary
我想要基本小部件(也是容器)的背景颜色(或图像),如网格或框。
如何为基本小部件设置背景颜色?
在 EFL 基本文档中,我找到了 elm_bg 函数,但我无法将其设置为其他基本容器的背景...
【问题讨论】:
标签: widget background-image tizen efl elementary
使用 elm_table 小部件。 通过使用 table,您可以将多个对象打包到同一个位置。
谢谢。
【讨论】:
也在tizen.org上问过,这部分显然不清楚
主题是要走的路,在以前的网址共享示例代码。
【讨论】:
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);
【讨论】: