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
Location: Gulf Breeze, Florida

Snap to grid?

Post by keithglong » Wed Sep 21, 2011 1:46 am

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
Location: NE USA

Re: Snap to grid?

Post by WaltBrown » Wed Sep 21, 2011 2:20 am

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
Location: Gulf Breeze, Florida

Re: Snap to grid?

Post by keithglong » Wed Sep 21, 2011 3:22 am

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
Location: NE USA

Re: Snap to grid?

Post by WaltBrown » Wed Sep 21, 2011 3:28 am

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
Location: Gulf Breeze, Florida

Re: Snap to grid?

Post by keithglong » Wed Sep 21, 2011 3:44 am

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 » Wed Jan 08, 2014 10:10 am

Is there a way of showing the grid when using the snap to grid option?

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Snap to grid?

Post by Klaus » Wed Jan 08, 2014 12:11 pm

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: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Snap to grid?

Post by bn » Wed Jan 08, 2014 2:52 pm

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 235 times

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Snap to grid?

Post by Simon » Thu Jan 09, 2014 2:56 am

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: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Snap to grid?

Post by bn » Thu Jan 09, 2014 8:07 am

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
Location: Palo Alto

Re: Snap to grid?

Post by Simon » Thu Jan 09, 2014 8:18 am

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: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Snap to grid?

Post by bn » Wed Jan 15, 2014 10:29 pm

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 8656 times
Kind regards
Bernd

Kangaroo SW
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 33
Joined: Sat Jan 15, 2011 10:57 am

Re: Snap to grid?

Post by Kangaroo SW » Wed Jan 15, 2014 10:40 pm

Hello Bernd

Thanks for this fantastic tool !

Cheers
Rolf

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Snap to grid?

Post by bn » Wed Jan 15, 2014 10:45 pm

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: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Snap to grid?

Post by bn » Thu Jan 16, 2014 3:10 pm

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

Return to “Getting Started with LiveCode - Complete Beginners”