Resizing a Text Field Dynamically, While Locking Its XY Coordinates

Scott Rossi scott at tactilemedia.com
Tue Jan 13 16:43:55 EST 2009


Recently, Ron Toledo wrote:

> I'm new to Rev, and am attempting to create a paned interface on a stack.
> 
> Specifically, I have two text fields, with a little grabber icon between
> them.  The effect I'm trying to accomplish is that, as I drag the little
> grabber button between the two fields, the two fields on either side are to
> automatically resize in width.
> 
> I'm experimenting with just the left text field and grabber icon at this
> time.  My current challenge is that when I drag the grabber, the text field
> on the left resizes in width-- however, it resizes from its centerpoint
> outwards.  Ideally, I would want the text field's XY coordinates to remain
> locked, while the right side of the text field resizes.
> 
> Is there a property for Rev objects that can configure objects to resize
> from one specific side?

Yes you want "the rect" of each field -- no locking necessary.

If you wish, you can take a look at a simple database example stack that
includes splitters (field resizers) by executing the following in your Rev
message box:

 go url "http://www.tactilemedia.com/site_files/downloads/contact_x.rev"

Clicking and dragging between fields allows you to resize them.

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design





More information about the use-livecode mailing list