언어 설정

Menu
Sites
Language
Multiple callback on label

Hello guys,

Can u tell me, is it possible to make multiple callbacks clicking on one label.
For example.

I ve got label with such text "Hello World!", and when i am clicking word "Hello" i do one action (for ex. open new window), and when i click "World" i do another action.

Responses

5 댓글
Jean Yang

Hello,

I think there is no callback can response for the different text in one label, but if you can set the last 2 cilck has different effect, you can set an flag in your smart callback function, and change the flag everytime when you enter the function.

 

Vikram

I think that's impossible. To achieve your requires, I think the stupid way is to add to label, one "hello" and another "world".

A better way is to define a customize layout group with two text part, and register the click callback for each of them. You can use a container widget such as box to hold the layout group. 

colin Rao

Hi, as the label widget is inherits from the layout, so that all the functions acting on layout also work for label objects, such as "elm_layout_file_set()", so you can just create a .edc file, and define a group with two text part, and call "elm_layout_file_set()" on the label widget.

Garik Bezruchko

thanx!

colin Rao

I've do some basic testing on label, by define a edc group with two text part, call "elm_layout_file_set()" on it, and register click callback. Seems it's works fine.

So, the label widget support the customized layout via edc.