IDE - Constrain dragged object to x or y axis

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

IDE - Constrain dragged object to x or y axis

Post by Mag » Fri Jul 05, 2013 2:07 pm

Would be nice when moving interface objects like buttons and fields to have them constrained to x or Y axis to maintain them aligned, as in Photoshop when you press and hold shift key.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: IDE - Constrain dragged object to x or y axis

Post by bn » Fri Jul 05, 2013 2:41 pm

Hi Mag,

if you select an object and then use the arrow keys you move the object 1 pixel on each press. However if you hold down the shift key while pressing an arrow key objects move 10 pixel. That should be enough to move an object rapidly where you want it. You may even select more than 1 object.
Can Photoshop do this? :)

Kind regards
Bernd

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: IDE - Constrain dragged object to x or y axis

Post by Mag » Fri Jul 05, 2013 3:18 pm

Hi Bern, thank you for the tip, I often do in this way (also in Photoshop). The situation when this feature could be very useful is when you want to duplicate an object by Option-drag it: currently you lost the new object's alignment.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: IDE - Constrain dragged object to x or y axis

Post by FourthWorld » Fri Jul 05, 2013 6:40 pm

LC's pointer tool can be influenced by a global grid property, with a settable grid size. This is adjustable in Prefs. When activated, movements snap to the specified grip increment, making it really easy to resize and move objects with nice alignment. I tend to leave mine set to a grid size of 4, which is fine enough to support nearly any layout I want yet large enough to make a good difference in ease of creating the layout.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: IDE - Constrain dragged object to x or y axis

Post by Mag » Fri Jul 05, 2013 6:58 pm

Hi Richard, could be very useful, I saw the menu item in the menu, but I can't understand as to activate it.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: IDE - Constrain dragged object to x or y axis

Post by FourthWorld » Fri Jul 05, 2013 7:42 pm

Mag wrote:Hi Richard, could be very useful, I saw the menu item in the menu, but I can't understand as to activate it.
The View->Grid item toggles the global property "grid". In Preferences, in the section for Appearance, you can set the grid size.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: IDE - Constrain dragged object to x or y axis

Post by Mag » Fri Jul 05, 2013 9:50 pm

OH, great, now I see. The default value is 2, so it was hard to see the effect! I try with 6.

Post Reply