Jan 7, 2004 #1 Semose Programmer Joined Sep 23, 2003 Messages 4 Location CA Could anyone tell me how to know what cell I'm double clicking? I want to execute a file using what is in the cell.
Could anyone tell me how to know what cell I'm double clicking? I want to execute a file using what is in the cell.
Jan 7, 2004 #2 towerbase Programmer Joined Jul 31, 2002 Messages 1,053 Location GB The member variables row and col tell you what cell you have (double) clicked. For example: Code: procedure TForm1.Grid1DblClick(Sender: TObject); begin ShowMessageFmt ( 'You clicked col %d and row %d', [ Grid1.Col, Grid1.Row ] ); end; Andrew Upvote 0 Downvote
The member variables row and col tell you what cell you have (double) clicked. For example: Code: procedure TForm1.Grid1DblClick(Sender: TObject); begin ShowMessageFmt ( 'You clicked col %d and row %d', [ Grid1.Col, Grid1.Row ] ); end; Andrew
Jan 7, 2004 #3 lespaul Programmer Joined Feb 4, 2002 Messages 7,083 Location US You can use the StringGrid.Cells[Column, Row] to get the information in the cell if that's what you need. Leslie Upvote 0 Downvote
You can use the StringGrid.Cells[Column, Row] to get the information in the cell if that's what you need. Leslie
Jan 8, 2004 Thread starter #4 Semose Programmer Joined Sep 23, 2003 Messages 4 Location CA Thanks! I used this already in a Tic-Tac-Toe program I made a while back, I was just using it in the wrong spot hehe Upvote 0 Downvote
Thanks! I used this already in a Tic-Tac-Toe program I made a while back, I was just using it in the wrong spot hehe
Jan 8, 2004 #5 towerbase Programmer Joined Jul 31, 2002 Messages 1,053 Location GB Leslie, to be pedantic (and the compiler usually is) the property indicating which column has been clicked is 'Col' not 'Column'. 'Row' is correct. Andrew Upvote 0 Downvote
Leslie, to be pedantic (and the compiler usually is) the property indicating which column has been clicked is 'Col' not 'Column'. 'Row' is correct. Andrew