Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Morph mouse up action (Smalltalk expression)
Last updated at 2:38 pm UTC on 18 December 2005
You can add a mouse up action (written as a Smalltalk expression) to any Morph.

You may either choose from the morph's menu 'extras/add mouse up action' and get a FillInTheBlank object to type in the Smalltalk expression or you can evaluate the following expression:

   myMorph addMouseUpActionWith: 'a Smalltalk expression (a String)'

Example:

  s := StringMorph new.
  s contents: 'Games'.
  s position: 100 @ 200.
  s font: (TextStyle default fontArray at: 4) emphasis: 1.
  s addMouseUpActionWith: '(Project named: ''Games'') enter'.
  s openInWorld


Also see Morphic Event Handling, SimpleButtonMorph