Creating a tiled photo grid?

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
JustinW42
Posts: 52
Joined: Sun Nov 30, 2014 7:22 am
Contact:

Creating a tiled photo grid?

Post by JustinW42 » Wed Feb 18, 2015 10:36 am

I know how to create data grid forms with custom row templates, which has come in quite handy thus far. However, I have always wanted to make a tiled grid of photos, much like you see when you browse your photo album on your iPhone.... Anyone have any tips to get started, or is it something that is more trouble than its worth?
-------------------------------------------------------------------------------------------------------------
Some things I do: http://www.katanadtg.com --- http://www.dtgprintsolutions.com

Klaus
Posts: 14208
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Creating a tiled photo grid?

Post by Klaus » Wed Feb 18, 2015 1:41 pm

Hi Justin,

don't have an iDevice, but you can also use a datagrid (of type FORM) for this!
Just create a "template" with a couple of empty image objects, should be
pretty straightforward!

This will also "free" you from creating lots of image objects manually or by script,
and group them etc., which will be neccessary anyway.

I have used this in the past for similar tasks and worked fine :D


Best

Klaus

JustinW42
Posts: 52
Joined: Sun Nov 30, 2014 7:22 am
Contact:

Re: Creating a tiled photo grid?

Post by JustinW42 » Thu Feb 19, 2015 8:07 am

Thanks for the tip! I guess I could create a row template that contains 3 image objects, then loop through my images array and assign 3 images at a time, while adding a new row each time through the loop..... I will mess around with it!
-------------------------------------------------------------------------------------------------------------
Some things I do: http://www.katanadtg.com --- http://www.dtgprintsolutions.com

Klaus
Posts: 14208
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Creating a tiled photo grid?

Post by Klaus » Thu Feb 19, 2015 5:54 pm

Hi Justin,
JustinW42 wrote:Thanks for the tip! I guess I could create a row template that contains 3 image objects, then loop through my images array and assign 3 images at a time, while adding a new row each time through the loop...
EXACTLY!
JustinW42 wrote:I will mess around with it!
Be sure to get back here when it gets too messy :D


Best

Klaus

JustinW42
Posts: 52
Joined: Sun Nov 30, 2014 7:22 am
Contact:

Re: Creating a tiled photo grid?

Post by JustinW42 » Mon Feb 23, 2015 12:14 pm

So far, so good.... I have the loop set up to assign the images to each row template, but I have not had enough time to really explore the options, yet.... Too many Livecode projects going on, at once! One question - how should I handle the "select image" subroutine? In other words (this is probably something stupid simple I am not thinking about right now), when a user clicks on a particular image in the grid, how do I determine which image is selected if it is part of the overall row, itself (which is currently storing 3 different images in the row data)?
-------------------------------------------------------------------------------------------------------------
Some things I do: http://www.katanadtg.com --- http://www.dtgprintsolutions.com

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Creating a tiled photo grid?

Post by jacque » Mon Feb 23, 2015 6:02 pm

See "the target" in the dictionary.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply