using stack images in a data grid form

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jim1001
Posts: 143
Joined: Fri Jan 29, 2016 6:25 pm

using stack images in a data grid form

Post by jim1001 » Tue Apr 12, 2016 3:29 pm

Hello there,

I've been following this lesson
http://lessons.livecode.com/m/datagrid/ ... -of-people

It uses the filename property to specify the image to use when it comes to loading the grid template with data.

I was wondering if it’s possible to use a stack image (e.g. loaded on a resource card) in a datagrid - if it is then how is the image specified?

Any help appreciated.

Thanks,
Jim

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

Re: using stack images in a data grid form

Post by Klaus » Tue Apr 12, 2016 5:16 pm

Hi Jim,

the easiest way is to use simple buttons (disabled etc. to make them non-functional)
and set their ICONs to the id of the desired imported image.

That's the way I do it all the time :D


Best

Klaus

jim1001
Posts: 143
Joined: Fri Jan 29, 2016 6:25 pm

Re: using stack images in a data grid form

Post by jim1001 » Wed Apr 13, 2016 12:52 pm

Thank you Klaus for this idea. I tried it and it worked nicely.

Now you qualify for a follow-up question about the same lesson :wink:

To what extent does the layout of the template affect the layout of the datagrid? I was hoping that a once the template was created that would define the layout but then slightly dismayed to read further on about a cryptic LayoutControl Message. Can the layout not be seen & adjusted visually before running the app?

Best wishes,
Jim

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

Re: using stack images in a data grid form

Post by Klaus » Wed Apr 13, 2016 12:59 pm

Hi Jim,

I never worked with the "layoutcontrol" message so far, but I think this is only important if you have a "dynamic" layout.
Means it may change its dimensions e.g. after clicking a "disclosure" triangle button to expand your initial layout.

But I may be wrong :D


Best

Klaus

jim1001
Posts: 143
Joined: Fri Jan 29, 2016 6:25 pm

Re: using stack images in a data grid form

Post by jim1001 » Thu Apr 14, 2016 2:54 pm

Klaus,

Thanks for your reply - and honesty!

Best wishes,
Jim

Post Reply