On Tue, 22 Oct 2019 15:03:47 +0800 (CST) Jing <[email protected]> said:

> Hi all,
> I define a IMAGE part in my EDC file with a default image. And call
> evas_object_image_file_set() to display a new image.  But when other parts
> receive a signal or event,  this IMAGE part will return to display the
> default png image,  please advise how to fix this issue,  many thanks.

never do that. the image is owned/controlled by edje. you are not meant to
modify the object of an edje part in any way. also don't rely on it always
existing. it may be deleted and re-created. you do not own this object. the
edje parent does.

if you want to have an image you can control, then SWALLOW parts are for that.
you provide an object to edje to "swallow into" the part. this means edje will
do these things to the swallowed object:

1. move + resize this object
2. stack it (raise/lower etc.)
3. take over layer controls (just don't mess with the layer to begin with)
4. show/hide as needed
5. set clipper
6. apply any evas maps
7. control pass/repeat events flags

when the edje parent is deleted, child swallowed objects are orphaned (they are
kicked out of the parent edje) and it's up to you to clean them up or re-use
them as needed.

so create an image and then swallow this image object into a SWALLOW part.


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
Carsten Haitzler - [email protected]



_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to