|
Function SetCellRow(obj1,obj2,obj3,height,devname,val)
If devname = "" Then
Exit Function
Else
If obj1.Exist And obj2.Exist Then
abs_y1 = obj1.GetROProperty("abs_y")
height1 = obj1.GetROProperty("height")
abs_y2 = obj2.GetROProperty("abs_y")
height2 = obj2.GetROProperty("height")
height = CInt(height)
Row = CInt((abs_y2-(height/2-height2/2)-abs_y1-height)/height)
If obj3.WpfCheckBox("devname:=" &devname,"index:=" &Row).Exist Then
obj3.WpfCheckBox("devname:=" &devname,"index:=" &Row).set val
Else
Reporter.ReportEvent 3,OF011,""
End If
Else
Reporter.ReportEvent 3,OF012,""
End If
End If
End Function
你用这个函数看看吧 |
|