Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TStringGrid - getting and setting cursor pos.

Status
Not open for further replies.

LucieLastic

Programmer
May 9, 2001
1,694
GB
hi All

Is it possible to set focus on a specified cell, eg something like cells[1,2].setfocus?

..and also, how does one find out the currently selected cell?

I'm thinking this should be simple but don't know how to do it?

lou
[pc]
 
Weez,

Set the Col and Row properties to the desired cell.

Hope this helps...

-- Lance
 
hi Lance

I understand how to use this when setting the cell now.

Can you tell me how to find out which cell has focus, or do I have to store it myself from the OnCellClick event?

lou
 
Use the StringGrid's Col + Row properties. Or use the Selection property to get multiple cell selections.
 
It's okay, I've sorted it, I was looking at the Cols and Rows properties.

Feel a bit thick now, sorry.

lou
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top