Reputation: 373
I have a tizen native app. I have used the following (after the typical create_basic_gui
code):
/* peoConformant previously set for window object */
peoBox = elm_box_add(peoConformant);
object_content_set(peoConformant);
evas_object_show(peoBox);
peoLabel = elm_label_add(peoBox);
elm_object_text_set(peoLabel, "Label Text");
elm_box_pack_start(peoBox, peoLabel);
elm_object_show(peoBox);
Now I would like to change the font and the font size for the label. I know that I can add html code to the label text that would do this. But is there a way through native API calls? I have tried evas_object_text_get(...)
and evas_object_text_set(...)
but they don't appear to do anything.
Any and all help appreciated.
TIA
ken
Upvotes: 0
Views: 248
Reputation: 21
As you said, it's best to use markup to change the font size. There is no API to directly set the font size of elm_label.
elm_object_text_set(label, "<font=Sans><font_size=20>hello world</font_size></font>");
And to get/set the text of elm_label, use elm_object_text_get/set API.
const char* str = elm_object_text_get(label);
elm_object_text_set(label, "hello world");
Upvotes: 0