PROCEDURE PaintLinesAlternative() setLineGroupProp("bordercolor", guisettings.gridbordercolor) setLineGroupProp("borderstyle", guisettings.gridborderLineStyle) setLineGroupProp("borderWidth", guisettings.gridborderLineWidth) PROCEDURE setLineGroupProp(tcPropName, tuValue) LOCAL oParent, lcPre, lcPost oParent = THIS.parent lcPre = "m.oParent." + this.NAME + "_" lcPost = "." + m.tcPropName TRY Store m.tuValue To; (m.lcPre + "T" + m.lcPost), ; (m.lcPre + "L" + m.lcPost), ; (m.lcPre + "R" + m.lcPost), ; (m.lcPre + "B" + m.lcPost), ; (m.lcPre + "H" + m.lcPost) ENDTRY RETURN ENDPROC>Your approach has the advantage of getting an object reference, which you may need if you wanted to do more things to it. At this point, with just color, Thomass's wins the elegance contest (and it's a one-liner!). If you wanted to change, say, line pattern or some such property, then it would be easier with object reference.
PROCEDURE PaintLines() > LOCAL oLine, oObject > > oObject = THIS > TRY > oLine = GETPEM(oObject.PARENT, oObject.NAME+"_T") > this.PaintLine(oLine) > oLine = GETPEM(oObject.PARENT, oObject.NAME+"_L") > this.PaintLine(oLine) > oLine = GETPEM(oObject.PARENT, oObject.NAME+"_R") > this.PaintLine(oLine) > oLine = GETPEM(oObject.PARENT, oObject.NAME+"_B") > this.PaintLine(oLine) > oLine = GETPEM(oObject.PARENT, oObject.NAME+"_H") > this.PaintLine(oLine) > ENDTRY > > PROCEDURE PaintLine(toLine) > with toLine > .bordercolor=guisettings.gridbordercolor > .borderstyle=guisettings.gridborderLineStyle > .borderWidth=guisettings.gridborderLineWidth > endwith >