-
11 Nov 2012 5:28 AM #1
Answered: How to render an image dynamically?
Answered: How to render an image dynamically?
Hello everyone,
I need to re-render an image (Ext.Image) after some events.
I found `doComponentLayout` function but it didn't work for me unfortunately.
How can I re-render an image which is an item of form?
Thanks in advance.."People will never forget how you made them feel."
linkedin.com/in/talhakabakus
-
Best Answer Posted by skirtle
I'm still pretty unclear what the question is here. For example, you might mean...
- Load a different image URL.
- Reload the same image URL but a different image.
- Resize the image component.
To load a new image just use setSrc. To reload the same image the easiest way is to append a dummy parameter onto the URL.
-
11 Nov 2012 10:01 PM #2
What do you mean by 're-render'?
-
11 Nov 2012 11:11 PM #3
@skirtle
I mean refreshing the image on demand after its first render"People will never forget how you made them feel."
linkedin.com/in/talhakabakus
-
11 Nov 2012 11:24 PM #4Sencha - Community Support Team
- Join Date
- May 2012
- Location
- Istanbul
- Posts
- 1,331
- Vote Rating
- 77
- Answers
- 124
Hi talha06,
FormPanel class have doLayout() method, call this method when you want to see changes. like-
Code:yourFormPanel.doLayout();
sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.
-
11 Nov 2012 11:26 PM #5
@sword-it
actually I've already tried it; but unfortunately it didn't work too.."People will never forget how you made them feel."
linkedin.com/in/talhakabakus
-
12 Nov 2012 3:49 AM #6
I'm still pretty unclear what the question is here. For example, you might mean...
- Load a different image URL.
- Reload the same image URL but a different image.
- Resize the image component.
To load a new image just use setSrc. To reload the same image the easiest way is to append a dummy parameter onto the URL.
-
12 Nov 2012 2:11 PM #7
thanks for your help, by the way it's not necessary to change src. it's enough to call setSrc method to refresh image.
But I think this should come by framework, a method like refresh can be a lot more suitable solution.Code:img.setSrc(img.src);
Thanks everyone for care."People will never forget how you made them feel."
linkedin.com/in/talhakabakus


Reply With Quote