Constraining resize/creation behavior

Bijan Parsia bparsia at email.unc.edu
Thu Nov 20 15:50:54 UTC 2003


On Wed, 19 Nov 2003, Ned Konz wrote:
[snip]
> Well, you can just override #setExtentFromHalo: if you want to change how the
> yellow resize halo handle works. Another example from Connectors:
>
> -------
> setExtentFromHalo: anExtent
> 	"The user has dragged the grow box such that the receiver's extent would be
> anExtent.
> 	Ignore the user's wishes completely."
> -------
>
> Likewise for brown-handle moving, you could override
> #setConstrainedPosition:hangOut:
>
> Or you could override the methods that construct the halo handles themselves
> (#addGrowHandle:, #addScaleHandle: #addDragHandle:, etc.)

Ok, interesting, thanks.. It does mean I have to either add this behavior
to all morphs or subclass every shape I want to use. I can live with that,
I guess. I confess to hoping that this behavior was a bit more
parameterizable.

Cheers,
Bijan Parsia.




More information about the Squeak-dev mailing list