Tizen Native API
|
Edje Text example
This example shows how to manipulate TEXT and TEXTBLOCK parts from code.
The very first we are going to do is register a callback to react to changes in the text of our parts:
- Note:
- Since edje_obj represent a group we'll be notified whenever any part's text in that group changes.
We now set the text for two our two parts:
- Note:
- Since the "part_two" part is a TEXTBLOCK we can use formatting such as <b>
And we now move on to selection issues, first thing we do is make sure the user can select text:
We then select the entire text, and print the selected text:
We now unselect the entire text(set selection to none), and print the selected text:
Our example will look like this:
The full source code follows:
The theme used in this example is:
To compile use this command:
* gcc -o edje-text edje-text.c -DPACKAGE_BIN_DIR=\"/Where/enlightenment/is/installed/bin\" -DPACKAGE_LIB_DIR=\"/Where/enlightenment/is/installed/lib\" * -DPACKAGE_DATA_DIR=\"/Where/enlightenment/is/installed/share\" * `pkg-config --cflags --libs evas ecore ecore-evas edje` * * edje_cc text.edc *