Hello,
prob I did not see so well the documentation, but is possible what written in topic?
The typical situation in which I would need to do this, is when I have a populated string grid, for example with a cell or a row previously selected, for example by means of mouse operation (one could imagine also a situation where there are multiple items selected, but in my case this is not important).
For some external reason, the string grid contents are modified.
I would like to restore the selection as much as possible as it was prior to the string contents modification (for example if the selected cell does no longer exist, ok, I won't try re-selecting it).
The startegy is the following:
1. when selecion is initially done, I store in a dedicated strcture (apart from the string grid) the information about what has been selected, I call this structure "selectioninformation"
2. after grid content gets modified, I scan the selectioninformation and for each item in there, see if there is still in the new string grid contents such a item, if so "set it selected".
The question here is the "set it selected" which I do not find how to do.
Other frameworks I used in previous programmer life, have something like
Cell[x, y].Selected := True
// or
Row[x].Selected := True;
What is the "official" way to do that with StringGrids?
Thanks