UI to make images resizable in standalone

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
tomBTG
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 73
Joined: Fri Nov 25, 2011 6:42 pm

UI to make images resizable in standalone

Post by tomBTG » Fri May 08, 2015 12:04 am

Hi,

How would you enable users to resize an image in a desktop standalone?

In the IDE, this is automatic after selecting the image to get "handles" on the image and choosing the pointer tool. Click and drag any handle to resize the image. But that doesn't work in a standalone. I am doing the same steps in a mousedown handler in the standalone (select me, choose pointer tool), but the image does not respond to dragging the handles. ("Resize" property is checked for the image control, if that matters.)

Suggestions on why this doesn't work and what would work?

Thanks,
Tom

tomBTG
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 73
Joined: Fri Nov 25, 2011 6:42 pm

Re: UI to make images resizable in standalone

Post by tomBTG » Fri May 08, 2015 11:15 pm

For anyone else searching this forum for an image resizer UI like that in the IDE, Ben Beaumont created one in a stack found here: http://livecodeshare.runrev.com/stack/7 ... ze-Control

You can easily make the image moveable as well as resizable by adding this to the image control's script:

Code: Select all

on mousedown
   hide group "resize"
   grab me
end mousedown

on mouseup
   set the loc of group "resize" to the loc of me
   show group "resize"
end mouseup
Thanks Ben!
-- Tom Bodine

Post Reply