<div dir="ltr"><div><div><div>There is an example in ImageMorph's comment. You can also look at the implementation of ImageMorph >> readFromFile. It prompts for a file name and then does what you are asking for:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">... self image: (Form fromFileNamed: fileName)</blockquote><br></div><div>So the statement could be:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">myImage := Form fromFileNamed: '../Cuis/Learning-Cuis/CuisLiftsAboveItsWeight.png'</blockquote><div><br></div>See also <b>ImageReadWriter class >> imageMorphFromFileEntry:.<br></b></div><div><b><br></b></div><div>Happy hacking!<br></div><div><b><br></b></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 2 Jun 2024 at 01:36, Mark Volkmann via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I imagine that changing the image displayed in an `ImageMorph` requires two statements, one to load an image from a file and one to change the `ImageMorph`. I think the second one looks like this:<div><br></div><div>`myImageMorph image: myImage.`</div><div><br></div><div>What's the statement I need to set the variable `myImage` to an image object?<br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><font face="arial, helvetica, sans-serif">R. Mark Volkmann</font></div><div><span style="font-size:12.8px"><font face="arial, helvetica, sans-serif">Object Computing, Inc.</font></span></div></div></div></div></div></div></div></div></div></div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div>