Problem 1) I can't seem to get lock screen to work for a datagrid when it loads. I am bringing in images and resizing them to fit the device and it is very distracting to see the process happen. I found one possible solution (http://www.forums.runrev.com/phpBB2/vie ... =9&t=13349) for delaying or caching images - but before doing that I thought I'd check on lock screen. It seems a lot easier.
Problem 2) My datagrid has different heights depending on the height of id_desc. On wider stacks, it works just fine. But on narrow stacks, it's doing weird things - on some it's putting the entire id_desc. On others, it cuts it off after one or two words. The image size that corresponds to it doesn't seem to make any difference. Here is a screenshot
[img]http//www.toolsforbusiness.info/disaster/datagrid_problem.jpg[/img]
Here is my code (forgive me for blatant errors - but I really don't understand rects so I probably have too many.... For some reason it actually works on wider stacks!)
Code: Select all
on LayoutControl pControlRect
local theFieldRect
set the right of image "image_resource" of me to item 3 of pControlRect - 5
set the top of image "image_resource" of me to item 2 of pControlRect + 35
put the left of image "image_resource" of me into theLeft
put the rect of image "image_resource" of me into theRectImage
set the rect of image "image_resource" of me to theRectImage
set the left of field "label" of me to item 1 of pControlRect + 5
set the top of field "label" of me to item 2 of pControlRect + 5
put the rect of field "label" of me into theRect0
set the rect of field "label" of me to theRect0
set the left of field "id_desc" of me to item 1 of pControlRect + 5
set the top of field "id_desc" of me to the top of field "label" of me + the formattedheight of field "label" of me + 5
put the rect of field "id_desc" of me into theRect1
put theLeft - 5 into item 3 of theRect1
put item 2 of theRect1 + the formattedheight of field "id_desc" of me - the bottommargin of field "id_desc" of me into item 4 of theRect1
set the rect of field "id_desc" of me to theRect1
set the top of button "link_address" of me to the top of field "id_desc" of me + the formattedheight of field "id_desc" of me + 5
put the rect of button "link_address" of me into theRect2
set the left of button "link_address" of me to item 1 of pControlRect + 5
set the bottom of button "email_link" of me to the bottom of button "link_address" of me
put item 4 of theRectImage + 20 into tone
put item 4 of pControlRect into ttwo
put max(tone,ttwo) into tuse
put tuse into item 4 of pControlRect
set the rect of graphic "Background" of me to pControlRect
end LayoutControl