H hug Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-25 #1 如何在Stringgrid 中判断焦点的位置,例如通过一个按钮, 对选中CELL等进行操作,
K kimfeng Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-25 #2 StringGrid1.Cells[StringGrid1.Col, StringGrid1.Row];
H hug Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-25 #3 TO Kimfeng : 谢谢你,我想知道怎样判断选中的位置,比如用鼠标选中了CELLS[3,5], 在按钮的CLICK事件里怎么判断,从而可进行操作!能否举个例子,在此感谢!
K kimfeng Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-25 #5 如果Grid中的Cell被Selected,StringGrid.Col就是Column的index; StringGrid.Row就是Row的index; 例如: procedure TForm1.BitBtn1Click(Sender: TObject); begin with StringGrid1 do Form1.Caption := Format('Col=%d Row=%d', [Col, Row]); end;
如果Grid中的Cell被Selected,StringGrid.Col就是Column的index; StringGrid.Row就是Row的index; 例如: procedure TForm1.BitBtn1Click(Sender: TObject); begin with StringGrid1 do Form1.Caption := Format('Col=%d Row=%d', [Col, Row]); end;
H hug Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-25 #7 我想实现类似如下的功能:怎么实现? procedure TForm1.BitBtn1Click(Sender: TObject); begin with StringGrid1 do IF cell[i,j] selected 或者row selected then cells[i,j-1]:=m; end;
我想实现类似如下的功能:怎么实现? procedure TForm1.BitBtn1Click(Sender: TObject); begin with StringGrid1 do IF cell[i,j] selected 或者row selected then cells[i,j-1]:=m; end;