logo       

Re: How to lay a morph down automatically: msg#00180

lang.smalltalk.squeak.beginners

Subject: Re: How to lay a morph down automatically

Mike O'Brien wrote:

> Newly opened morphs seem to arrive in "picked-up" mode,
>attached to the "hand" (cursor). You left-click to drop them.
>
> I went looking for the code that executes when you left
>click on a picked-up morph but couldn't find it.
>
> If I wanted to create a morph programmatically and have
>it start life already laid down somewhere, how would I do that?
>I'm presuming that the same check would get done as to whether it
>were to embed itself in whatever it was laid down on, or just
>sit there. Of course this might wind up embedding it in whatever
>the mouse cursor happened to be sitting on at the moment, which
>would be bad news, since in this case the mouse and the morph
>wouldn't be near each other.
>
> Thanks!
>
>Mike O'Brien
>______________________________________________
>
>
Mike,

Is this what you mean?

HeadMorph new openInWorld

as opposed to

HeadMorph new openInHand

Additional you can position them:

hm := HeadMorph new openInWorld.
hm position: 400@300.

Hope that helps...

David


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise