Datagrid - adding line under variable height records
Posted: Fri Jan 02, 2015 4:38 pm
Hi,
Happy new year !
I am trying to display a line under a variable height field on a datagrid form. I have defined a line in the row template and attempt to move it in the Layoutcontrol handler. However, I have tried using the points of the line, the location of the line and the rectangle of the line but none have worked. The line gets moved but does not display for all records. My latest failure is listed below.
Happy new year !
I am trying to display a line under a variable height field on a datagrid form. I have defined a line in the row template and attempt to move it in the Layoutcontrol handler. However, I have tried using the points of the line, the location of the line and the rectangle of the line but none have worked. The line gets moved but does not display for all records. My latest failure is listed below.
Code: Select all
-- rect 1-left, 2-top, 3-right, 4-bottom
-- Now place the line that acts as a record separation
-- first increase the size of the record by six pixels
put (item 4 of pControlRect +6) into item 4 of pControlRect
put the points of graphic "MyLine" of me into tPoints -- starting point for the size and position of line
-- two points per line
Put line 1 of tPoints into tStartCoOrd -- X fom left , Y from top
Put line 2 of tPoints into tEndCoOrd
put item 4 of pControlRect into item 2 of tStartCoOrd
put item 4 of pControlRect into item 2 of tEndCoOrd
put tStartCoOrd & CR & tEndCoOrd into tNewPosn
set the points of graphic "MyLine" to tNewPosn
-- resize the bounding rectangle to match the resized field
set the rect of graphic "Background" of me to pControlRect
------
SetForeGroundColor
end LayoutControl