Board index » cppbuilder » TStringGrid, moving current cell

TStringGrid, moving current cell

Hello. I think this is the place to ask this. I have a TStringGrid component
and I was wondering how I would be able to move a cell up, down, left ,
right whenever a certain key capture has occurred. I have the key capture
working, but I cannot find any information to control the cell position in
the help files. Thanks in advance.

Ryan

 

Re:TStringGrid, moving current cell


I think you mean myStrGrid->Row= something;  and
myStrGrid->Col=otherthing; , the indices of the selected cell.  Or do
you mean the contents of the cell?

--
Timothy H. Buchman
========================================
City Center Theater
New York NY
tbuch...@citycenter.org
Please treat this signature information as confidential.
========================================
Search .borland newsgroup archives at:
http://www.mers.com/searchsite.html

Quote
Ryan Taylor <super...@umit.maine.edu> wrote in message

news:39174309@dnews...
Quote
> Hello. I think this is the place to ask this. I have a TStringGrid
component
> and I was wondering how I would be able to move a cell up, down,
left ,
> right whenever a certain key capture has occurred. I have the key
capture
> working, but I cannot find any information to control the cell
position in
> the help files. Thanks in advance.

> Ryan

Re:TStringGrid, moving current cell


You don't MOVE the cell, you can only reposition the text as needed.  Have a
look at the Cells[][] property for getting the current cell's text, then set
the next cell over's text to that value in accordance to the key pressed.

Gambit

Quote
"Ryan Taylor" <super...@umit.maine.edu> wrote in message

news:39174309@dnews...
Quote
> Hello. I think this is the place to ask this. I have a TStringGrid
component
> and I was wondering how I would be able to move a cell up, down, left ,
> right whenever a certain key capture has occurred. I have the key capture
> working, but I cannot find any information to control the cell position in
> the help files. Thanks in advance.

Re:TStringGrid, moving current cell


Thanks. That worked beautifully. I am relatively new to builder, I find that
the help file is great for something's, but other things I cant find for the
life of me. I want to Thank everyone that has helped me in the last few
weeks.

Other Threads