Anchoring Objects
Ned Konz
ned at bike-nomad.com
Fri Sep 5 16:01:44 UTC 2003
On Friday 05 September 2003 08:27 am, 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?
Yes. Look at TextAnchor. It's a text attribute that can be applied to
the current selection (or other appropriate chunk of text) and will
move its anchored Morph as needed.
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|