Hi Eros,
Oops!
I missed the link to MLGrid_SetSelected before.
I have now tried:
Function FixFirstGridElement()
' TempString = MLGRID_Get(CurrentGridHandle, 1, 2) ' These two lines position away from col 1
' n = MLGRID_Put(CurrentGridHandle, 1, 2, TempString)
'Console_WriteLine "FixFirstGridElement: GridNo = " + CurrentGridHandle + " TempString = " + TempString
' TempString = MLGRID_Get(CurrentGridHandle, 1, 1) ' These two lines position away from col 1
' n = MLGRID_Put(CurrentGridHandle, 1, 1, TempString)
'Console_WriteLine "FixFirstGridElement: GridNo = " + CurrentGridHandle + " TempString = " + TempString
'
' TempString2 = MLGRID_Get(CurrentGridHandle, 1, 2)
' TempString = MLGRID_Get(CurrentGridHandle, 1, 1)
' n = MLGRID_Put(CurrentGridHandle, 1, 2, TempString)
' TempString = MLGRID_Get(CurrentGridHandle, 1, 2)
' n = MLGRID_Put(CurrentGridHandle, 1, 1, TempString)
' n = MLGRID_Put(CurrentGridHandle, 1, 2, TempString2)
n = MLGRID_SetSelected(hGrid, 1, 2)
Console_WriteLine "n = MLGRID_SetSelected(hGrid, 1, 2) executed "
'n = MLGRID_SetSelected(hGrid, 1, 1)
'Console_WriteLine "n = MLGRID_SetSelected(hGrid, 1, 1) executed "
InitialGridFieldFound = 0
End Function
The pointing to 1,2 then back to 1,1 made no difference, so I suppressed the pointing back to 1,1 to see what would happen using just the 1,2. Nothing did. So once again, I assume I am doing something wrong somewhere.
Another note: I placed MLGRID_SetSelected(hGrid, 1, 2) into the excellent grid example after the random cell filling loop, to see what would happen. It works well. However, for some reason, row 3 becomes the first row visible in the grid. I have to move the slide bar up to see rows 1 and 2.
I will scratch around to uncover the source of the foolishness I am perpetrating.
Once again, thanks for your help.
Regards,
Peter H.
Bookmarks