e.g Grid.Object.
the methods can be pulled out from the class library located at
however to perform different keyboard operations like dbl click we need to use the below code.
Public function GridCellDBClick(row,col,Grid)
set objGrid = Grid.Object
If objGrid.RowCount <>
GridCellDBClick = False
End If
'get the cell in view by scrolling the view
objGrid.ScrollCellInView3 row,col,"dbclick"
'clear the selections
objGrid.Selections.clear
objGrid.SelectRow row
'get the current selected cell object
Set objcurrentcell= Grid.Object.CurrentCell
' move the selection to current cell
objcurrentcell.MoveTo row,col
objcurrentcell.ScrollInView
'get the coordinates of the cell
set rect = objGrid.RangeInfoToRectangle(objcurrentcell.rangeinfo)
'double click on the cell Grid.DblClick rect.X + rect.Width/2, rect.Y + rect.Height/2
End function
1 comment:
QTPbook
Post a Comment