这是一行的代码 条目 (TextEdit等效): Evas_Object *entry;- Evas_Object *layout;
- Evas_Object *scroller;
- Evas_Object *box;
- Evas_Object *nf = data;
- scroller = elm_scroller_add(nf);
- box = elm_box_add(scroller);
- evas_object_size_hint_align_set(box, EVAS_HINT_FILL, 0.0);
- evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, 0.0);
- elm_object_content_set(scroller, box);
- layout = elm_layout_add(box);
- elm_layout_file_set(layout, ELM_DEMO_EDJ, "entry_layout");
- evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, 0.0);
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, 0.0);
- entry = elm_entry_add(layout);
- elm_entry_single_line_set(entry, EINA_TRUE);
- elm_entry_scrollable_set(entry, EINA_TRUE);
- eext_entry_selection_back_event_allow_set(entry, EINA_TRUE);
- evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_smart_callback_add(entry, "activated", entry_activated_cb, NULL);
- elm_object_part_content_set(layout, "entry_part", entry);
- elm_box_pack_end(box, layout);
- evas_object_show(layout);
复制代码
更多类型的条目看看tizen SDK提供的例子。 |