Good morning to all,
there's a strange behavior when use advstringgrif.find if the find starts from some column and -1 row.
First grid setting
Options as default with goRowSelect:=True
Navigations as default with KeepHorizScroll:=True and LeftRightRowSelect:=False
After populated the grid i made some situation (not for fun but because with situation 2 i had some trouble).
Assuming Loc : TPoint and Fp : TFindParams
-
search for value in any cells
As the example in the manual
Fp := [fnMatchRegular];
Loc := Point(-1,-1);
Loc := SG1.Find(loc, '' + SEdt3.Text + '', fp);
Loc return the cell coordinate where the value is -
search for value in a definited column #1
Fp := [fnMatchRegular];
Loc := Point(4,-1);
Loc := SG1.Find(loc, '' + SEdt3.Text + '', fp);
Even if the value exist in a cell, Loc return always Loc.X=-1 and Loc.Y=-1 -
search for value in a definited column #2
Fp := [fnMatchRegular];
Loc := Point(4,0);
Loc := SG1.Find(loc, '' + SEdt3.Text + '', fp);
With a starting row >-1, Loc return the cell coordinate where the value is
Is very problaby that the case 2 must not be used !!
Thank's for attention
Regards
Daniele