Datagrid question
zryip theSlug
zryip.theslug at gmail.com
Wed Mar 23 19:57:39 EDT 2011
On Wed, Mar 23, 2011 at 8:58 PM, Klaus on-rev <klaus at major.on-rev.com> wrote:
> Hi friends,
Hi Klaus,
> is it possible to create a datagrid FORM that can act like 2 or more
> independant "clickable" "Cells?" (separate row "wannabees") in one row?
Yes
> Know what I mean? Something like this mockup:
> <http://www.major-k.de/temp/DataGridsRows.jpg>
>
> Any hints, tricks, hacks welcome :-)
A possible way is to edit the template of the dg form for adding
severals buttons or images controls, acting as "cells".
In the row behavior you should have 2 main handlers:
1. Fillindata for displaying the corresponding data for the cell
Example using images in files
on FillInData pDataArray
local tImagePath1, tImagePath2
put pDataArray["file path 1"] into tImagePath1
put pDataArray["file path 2"] into tImagePath2
if (tImagePath1 is not empty) then
put URL "binfile:" & tImagePath1 into tImageData
put tImageData into image "New image1" of me
end if
if (tImagePath2 is not empty) then
put URL "binfile:" & tImagePath2 into tImageData
put tImageData into image "New image2" of me
end if
set the text of field "Label1" of me to pDataArray["Image label 1"]
set the text of field "Label2" of me to pDataArray["Image label 2"]
end FillInData
2. MouseUp
on mouseUp pTheButton
if (pTheButton is 1) then
switch the short name of the target
case "New image1"
answer "Add your action here"
break
case "New image2"
answer "Add your action here"
break
case "New image3"
answer "Add your action here"
break
end switch
end if
end mouseUp
Note DGH could be on some help with that. You are welcome to download
it, the DGH trial version is free to use for 30 days and could give
you some help in your journey.
http://www.aslugontheroad.co.cc/index.php?option=com_phocadownload&view=category&download=17:data-grid-helper-plugin&id=12:trial&Itemid=63
Best,
--
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
More information about the use-livecode
mailing list