Forum > FPSpreadsheet

[solved] How to activate/show/focus cells


Hello forummembers,

I use the FPSearchengine to find cells in a workbook with a couple of worksheets.
The result of the search is stored in a stringlist with the information of cell and worksheet
Now I try to "search backwards". That means, I will show  the found cell/worksheet on screen.
I have no problems to show the found worksheet, but if I try to show/focus/activate the found cell on screen I fail.
I see one of the cells in the found worksheet but not the found one from the stringlist.

My question: How to show/focus/activate a cell on a shown worksheet.

Thanks in advance.


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---// Select cell B5// "B5" is in the worksheet in row 4 and column 1// Note: this is different in the grid which is offset by the fixed rows/colsprocedure TForm1.Button1Click(Sender: TObject);begin  sWorksheetGrid1.Worksheet.SelectCell(4, 1);   // or  {  sWorksheetGrid1.Col := 2;  sWorksheetGrid1.Row := 5;  }end;

Thanks WP,

your help solves my problem.


[0] Message Index

Go to full version