Tizen基本数据库表container代码
这个代码片段演示了如何创建一个基本表容器,设置它的基本属性,并将数据添加到细胞。//create the table
Evas_Object *table = elm_table_add(ad->win);
elm_win_resize_object_add(ad->win, table);
evas_object_show(table);
//set basic properties
elm_table_padding_set(table, 5, 5);
elm_table_homogeneous_set(table, EINA_TRUE);
//populate the table with sample data
for(int i = 0; i<3; i++){
for(int j= 0; j<5; j++){
Evas_Object *label = elm_label_add(ad->win);
char buf;
snprintf(buf, sizeof(buf), "(%d,%d)", i, j);
elm_object_text_set(label, buf);
evas_object_show(label);
elm_table_pack(table, label, i, j, 1, 1);
}
}
页:
[1]