Snap to grid?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
keithglong
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 348
Joined: Sun Jul 03, 2011 2:04 am

Snap to grid?

Post by keithglong »

Hi All,

"Grid" is selected in my View menu, but I am not seeing any grid lines (nor are my objects snapping into place). Am I missing something. I am running LiveCode 4.6.4 on a Windows 7 machine.

Thanks!

- Boo
WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Re: Snap to grid?

Post by WaltBrown »

Boo,
I tried it. By default the grid snap to distance on my Win7 machine was 2 pixels, so it wasn't apparent. I went into menu->edit->preferences->appearance and changed it to 10 and the grid snapping became much more apparent.
Walt
Walt Brown
Omnis traductor traditor
keithglong
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 348
Joined: Sun Jul 03, 2011 2:04 am

Re: Snap to grid?

Post by keithglong »

Hi Walt,

Thanks for your reply. I actually tried that, but still no snap-to-grid action. Very odd.

Sincerely,

- Boo
WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Re: Snap to grid?

Post by WaltBrown »

That is. I can't replicate it. If you find out what is causing it....
Walt
Walt Brown
Omnis traductor traditor
keithglong
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 348
Joined: Sun Jul 03, 2011 2:04 am

Re: Snap to grid?

Post by keithglong »

Okay. I now see that when slowly moving an object (such as a button) around with Grid enabled, it does in fact move in increments according to my settings. I suppose I was under the impression that there would be some grid lines available, etc. (I have seen it this way in other development packages.) You know, where the objects snap to visible grid lines...

Thanks again,

- Boo
Einherjar
Posts: 18
Joined: Thu Dec 12, 2013 7:38 pm

Re: Snap to grid?

Post by Einherjar »

Is there a way of showing the grid when using the snap to grid option?
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Snap to grid?

Post by Klaus »

Einherjar wrote:Is there a way of showing the grid when using the snap to grid option?
No.
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4219
Joined: Sun Jan 07, 2007 9:12 pm

Re: Snap to grid?

Post by bn »

Hi Einherjar,

I attach a little stack with a group in it. If you copy that group to a card it will show the current grid as a backgroundPattern of that card.
You can remove the grid from a button in that group. If you are done just delete the group from your card.
If you change grid spacing just remove the old grid and the button lets you draw a grid with the new spacing.

It is a little awkward but works, and it is not intrusive.

Kind regards
Bernd
Attachments
gridDrawer.livecode.zip
(1.87 KiB) Downloaded 704 times
Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Snap to grid?

Post by Simon »

Hi Bernd,

Are you the creator of WheeLib?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4219
Joined: Sun Jan 07, 2007 9:12 pm

Re: Snap to grid?

Post by bn »

Hi Simon,
Are you the creator of WheeLib?
no.
But is uses a widget (the wheel) I made.

it is what we discussed here:
http://forums.runrev.com/phpBB2/viewtop ... f=5&t=5870

and which evolved to an iOS7 style wheel/slotmachine

http://runtime-revolution.278305.n4.nab ... 73460.html

Kind regards
Bernd
Last edited by bn on Thu Jan 09, 2014 9:50 am, edited 1 time in total.
Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Snap to grid?

Post by Simon »

Thought it looked familiar. :D

Simon
Last edited by Simon on Thu Jan 09, 2014 9:11 am, edited 2 times in total.
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4219
Joined: Sun Jan 07, 2007 9:12 pm

Re: Snap to grid?

Post by bn »

Hi All,

As a result of this thread I uploaded GridDrawer to revOnline. It is a much improved version or above's stack.

It lets you drag a widget on a card and lets you see a grid. The grid is a background pattern of the card where the widget is placed. Control grid size from the widget, toggles snap-to-grid from the widget.

I uploaded the widget to User Samples, (accessible from within Livecode) or
LivecodeShare, accessible via the net:

http://livecodeshare.runrev.com/stack/757/gridDrawer
gridDrawer.png
gridDrawer.png (11.84 KiB) Viewed 16908 times
Kind regards
Bernd
Kangaroo SW
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 40
Joined: Sat Jan 15, 2011 10:57 am

Re: Snap to grid?

Post by Kangaroo SW »

Hello Bernd

Thanks for this fantastic tool !

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

Re: Snap to grid?

Post by bn »

Hi Rolf,

Thank you, good to "read" you.

Any suggestions or bugs here or directly.

I like the inner working of the stack, which can be used to distribute widgets. It is an adaption from the Livecode Tools stack.

Kind regards
Bernd
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4219
Joined: Sun Jan 07, 2007 9:12 pm

Re: Snap to grid?

Post by bn »

Hi All,

thanks to Rolf's tips Interface of gridDrawer widget now cleaner and you can move widget around the stack in browser mode by click-move.

http://livecodeshare.runrev.com/stack/757/GridDrawer

Kind regards
Bernd
Post Reply