I have a data grid FORM with multiple objects in group "row template" of the associated data grid template.
Templates start with a graphic "Background" and a text field. To these, I've added a third object (an image), which I've put into the group "row template".
However, there is a problem with layering. Why does the background graphic insist on being in front of my image? Changing the relative layer using the Position tab does NOTHING. Very weird.
Problem 1: The background graphic hides the image of row 1. There is clearly some hidden interaction going on, but it's weird, because I've successfully gotten around this (?) bug before and been able to use images in multi-row data grid forms. But whenever I create a data grid, there's something funky going on with the layer of the background graphic. Some behavior that isn't explicitly spelled out.
Problem 2: only row 1 is displayed at all. For some reason handler LayoutControl is only being called once so only the objects for row 1 are being placed. But why would it do that if I clearly have ten rows of tab delimited text separated by carriage return? (I've checked those invisible chars with Notepad++ and as far as it can tell me, they're all there and in the right place!)
Here's some of the relevant code, just in case I did something silly:
Code: Select all
on FillInData pDataArray
set the text of field "Text" of me to tText
set the filename of img "Icon" of me to tURL
end FillInData
Code: Select all
on LayoutControl pControlRect
set the width of img "Icon" of me to 100
set the height of img "Icon" of me to 100
set the top of fld "Text" of me to item 2 of pControlRect
set the top of img "Icon" of me to item 2 of pControlRect
set the top of graphic "Background" of me to item 2 of pControlRect
set the layer of img "Icon" of me to (1 + graphic "Background" of me) --I've tried it without these lines; no dice
set the layer of graphic "Background" of me to (1 - img "Icon" of me) --I've tried it without these lines; no dice
set the rect of graphic "Background" of me to pControlRect
end LayoutControl
Ivan