Resizing a Text Field Dynamically, While Locking Its XY Coordinates
rontoledo at gmail.com
Tue Jan 13 17:27:51 CST 2009
Thank you all very much; yes, the Rect property is definitely the way to
go. I also got a similar response from Malte. As I mentioned to him, it's
amazing to me (as a newbie, but longtime fan of Revolution) how elegant this
language is. Imagine trying to purely code this in Adobe Flex, for example,
and the amount of lines of code it would require.
What I like is how few lines of code can give one just the results desired.
When I tried the Rect property and it worked perfectly, it was like magic!
Very cool, indeed.
Thank you again,
On Tue, Jan 13, 2009 at 2:30 PM, Sarah Reichelt <sarah.reichelt at gmail.com>wrote:
> > 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
> > on the left resizes in width-- however, it resizes from its centerpoint
> > outwards. Ideally, I would want the text field's XY coordinates to
> > 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?
> I adjust the rect of the object to do this. The rect has the four
> points of the object: left, top, right, bottom.
> A mnemonic for this that I was told once is "LiTteR Bug".
> Here is an example which increases the width of a field by 10 pixels,
> while keeping the topLeft of the field in the same place:
> put the rect of fld "My Field" into tRect
> add 10 to item 3 of tRect
> set the rect of fld "My Field" to tRect
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the use-livecode