[DOCS] SimpleButtonMorph (was Re: A cleaner Morphic for 3.5 image)

Hannes Hirzel hannes.hirzel.squeaklist at bluewin.ch
Tue Feb 11 22:19:37 UTC 2003

tblanchard at mac.com wrote:

> You shouldn't have to do that either.  Something along the lines of
> Button new label: 'OK'; color: aColor; pressedColor: 'anotherColor'; 
> onMouseUpDo: [:sender | receiver okClicked ].

Hi Todd

May I ask you to have a look at page


A SimpleButtonMorph when pressed sends a message to a target object.

An example (put it into a Workspace, select it, and 'do-it'):
 s := SimpleButtonMorph new.
 s target: World.
 s label: 'prev'.
 s position: 20 @ (Display height - 100).
 s actionSelector: #goBack.
 s openInWorld.

It creates a 'go-to-previous-project' button

We recently read on this list that 4 out of 5 Squeak programmers
recommend SimpleButtonMorphs to their patients!
If working with eToys is so easy why don't we have an easy step by step
instruction on the swiki? The example description
posted by Andreas Raab was to terse. 

Would you like to update that page? Perhaps by elaborating the etoy
instructions posted by Andreas Raab
a few hours ago to contrast that with the Smalltalk code so that we get
a clearer picture?

Hannes Hirzel

More information about the Squeak-dev mailing list