Graphic object resizing?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Dondi
Posts: 18
Joined: Fri Apr 10, 2009 2:40 am

Graphic object resizing?

Post by Dondi » Sun Jun 21, 2009 3:08 am

Hi,

I am a rev newbie; but thanks to the generous members of the rev community I am making slow, but steady progress on my "learning project" -- a simple drawing app.

So far I have a simple palette of tools and a canvas where I can add objects of several shapes, select them and drag them around.

I have accomplished that using two simple message handlers that are added at object creation as follows:

set the script of the templateGraphic to

"on mouseWithin" & CR & " select me" & CR & "end mouseWithin" & CR &

"on mouseDown" & CR & " grab me" & CR & "end mouseDown"


Here is the problem:

When I select an object, the resize handles are shown; however, when I click and drag any of them, the object simply moves -- no resizing occurs.

I have searched the dictionary and the forums for object properties or other pointers on how to enable object resizing, but I am coming up blank. Any pointers are appreciated. Thanks,

Dondi.

Dondi
Posts: 18
Joined: Fri Apr 10, 2009 2:40 am

Post by Dondi » Tue Jun 23, 2009 4:01 am

Solved -- sort of ...

I modified the on mouseWithin handler by adding the "choose pointer tool" as follows:

Code: Select all

on mouseWithin
  select me
  choose pointer tool
end mouseWithin
Now I am able to resize the created objects when the app is run within Rev. However, the standalone app still behaves as in the original post -- i.e., clicking and dragging the resize squares moves the object instead of resizing them.

Thoughts?

Thanks,

Dondi.

edljr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 56
Joined: Sun Oct 26, 2008 6:47 am
Contact:

Resizing Created Objects

Post by edljr » Sun Jul 19, 2009 3:03 am

Dondi,

Did you figure out a solution to this problem?

Ed

Dondi
Posts: 18
Joined: Fri Apr 10, 2009 2:40 am

Re: Resizing Created Objects

Post by Dondi » Thu Jul 23, 2009 3:36 am

edljr wrote:Dondi,

Did you figure out a solution to this problem?

Ed
Not yet Ed.

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Post by shadowslash » Thu Jul 23, 2009 12:36 pm

Dondi wrote:

Code: Select all

on mouseWithin
  select me
  choose pointer tool
end mouseWithin
Have you tried switching your script like instead of the one above, try

Code: Select all

on mouseWithin
  choose pointer tool
  select me
end mouseWithin
I'm still going to try to find an answer on my Rev but this is just something you may want to try.
Parañaque, Philippines
Image
Image

Post Reply