The way I&#39;ve done it in the past is to just send #delete to the morph, and then add a new one in its place.<div><br></div><div>For instance, in this GUI:</div><div><br></div><div><a href="http://www.huv.com/roboMagellan/MissionEditor.jpg">http://www.huv.com/roboMagellan/MissionEditor.jpg</a></div>
<div><br></div><div>The morph at the bottom right, containing the navigator-specific information, is removed and replaced any time a new goal is selected, since each goal has a navigator, and specific navigators have different information associated with them that must be set...</div>
<div><br></div><div>Here&#39;s the method I call to do it:</div><div><br></div><div><div>addNavigatorPanelFor: aNavigator</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>navigatorMorph isNil</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>ifFalse: [navigatorMorph delete].</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>navigatorMorph := AlignmentMorph new</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>listDirection: #topToBottom;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>color: Color white;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>vResizing: #shrinkWrap;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>hResizing: #shrinkWrap;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>cellPositioning: #topLeft;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>yourself.</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>aNavigator notNil</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>ifTrue: [aNavigator addNavigatorMorphsTo: navigatorMorph for: self].</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>window</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>addMorph: navigatorMorph</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>fullFrame: (LayoutFrame </div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>fractions: (0@0 corner: 1@1) </div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>offsets: (480@285 corner: -5@-5)).</div><div><br></div>
</div><div>So, basically, it deletes the old navigator morph, creates a new alignment morph in its place, and then asks the navigator to add its specific submorphs to it. Then it finally adds the new alignment morph to the window.</div>
<div><br></div><div>- Jon</div><div><br><br><div class="gmail_quote">On Fri, Jul 1, 2011 at 6:01 PM, Ralph Boland <span dir="ltr">&lt;<a href="mailto:rpboland@gmail.com">rpboland@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I have constructed a GUI (using Morphic) in which one submorph  M<br>
needs to have its current submorphs replaced by another set of submorphs.<br>
In general there are several submorph sets exactly one of which is the set<br>
of submorphs of  M at any one time and which one is in use is determined by<br>
user input (say clicking a button).  The submorph sets are not<br>
necessarily disjoint.<br>
<br>
Are there any examples showing how I do this?<br>
Or is it documented somewhere?<br>
<br>
In my case at least  M  itself does not move within my main GUI.<br>
<br>
Any help or pointers to where help can be found much appreciated.<br>
<br>
Regards,<br>
<font color="#888888"><br>
Ralph Boland<br>
<br>
</font></blockquote></div><br></div>