Anchoring Objects

Lex Spoon lex at cc.gatech.edu
Fri Sep 5 20:15:03 UTC 2003


If you want clickable text, then it would be simpler to use
TextAttribute's.  You can assign a text attribute to a range of text,
and then that attribute will get to decide what happens when the text is
clicked on.  In particular, PluggableTextAttribute looks helpful for
your purpose.  Alternatively, you can make your own subclass of
TextAttribute. -Lex



jlonglan at uwo.ca wrote:
> I've been working on my little project for a few weeks now..  and I thought I 
> was pretty much done.  I created a transparent morph that I'm using as a 
> button.  I place the morph on top of an area of text in my 
> PluggableTextMorph..  and when the user clicks on the "text" - they actually 
> click on the button, and open my interactive activity...  except for one 
> problem.  I just realized that my transparent buttons stay in the same place, 
> instead of anchoring to the specific text.  I feel quite dumb for missing 
> something so obvious...  Could someone tell me how I can anchor the button so 
> it'll stay in the same spot?
> 
> Thanks,
> Jeff



More information about the Squeak-dev mailing list