1 #include <Elementary.h>
2 #ifndef ELM_LIB_QUICKLAUNCH
4 test_table(void *data, Evas_Object *obj, void *event_info)
6 Evas_Object *win, *bg, *tb, *bt;
8 win = elm_win_add(NULL, "table", ELM_WIN_BASIC);
9 elm_win_title_set(win, "Table");
10 elm_win_autodel_set(win, 1);
13 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
14 elm_win_resize_object_add(win, bg);
17 tb = elm_table_add(win);
18 elm_win_resize_object_add(win, tb);
19 evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
22 bt = elm_button_add(win);
23 elm_button_label_set(bt, "Button 1");
24 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
25 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
26 elm_table_pack(tb, bt, 0, 0, 1, 1);
29 bt = elm_button_add(win);
30 elm_button_label_set(bt, "Button 2");
31 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
32 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
33 elm_table_pack(tb, bt, 1, 0, 1, 1);
36 bt = elm_button_add(win);
37 elm_button_label_set(bt, "Button 3");
38 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
39 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
40 elm_table_pack(tb, bt, 2, 0, 1, 1);
43 bt = elm_button_add(win);
44 elm_button_label_set(bt, "Button 4");
45 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
46 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
47 elm_table_pack(tb, bt, 0, 1, 2, 1);
50 bt = elm_button_add(win);
51 elm_button_label_set(bt, "Button 5");
52 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
53 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
54 elm_table_pack(tb, bt, 2, 1, 1, 3);
57 bt = elm_button_add(win);
58 elm_button_label_set(bt, "Button 6");
59 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
60 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
61 elm_table_pack(tb, bt, 0, 2, 2, 2);
64 evas_object_show(win);