Forum Discussion

darshan_gandhi's avatar
darshan_gandhi
Occasional Contributor
11 years ago

MSFlex Grid issue

Hi, I am working on a Windows based application designed in VB6. We are having a grid which is a MSFlex grid and inside that grid we have a ComboBox (in each cell) to select a specific value...
  • murugans1011's avatar
    11 years ago
    As this grid is not supported there is no builtin method to click cell. however u can find the coodrinates of cell click onthe paricular celll. here is the sample code



       Msflexgrid.setfocus

        Msflexgrid.row=1   'row Value

        Msflexgrid.col=1   'ColumnValue



            'to calculate the coordinates of the cell



            x=Msflexgrid.CellTop+form.Top

            y=Msflexgrid.CellLeft+form.Left



            'to convert twip into pixels



            twip_pixel_ratio = form.ScaleWidth / form.Width

            x = x/twip_pixel_ratio

            y = y/twip_pixel_ratio





    Call Msflexgrid.Click( y ,x)  'Clicks the 1st cell