0

我找不到从 stringgrid 复制选定单元格数据的方法,如果可能的话,我希望将选定的数据字符串复制到编辑框.. 提前非常感谢。我使用的是delphi xe8,firemonkey。

到目前为止我尝试了什么..

Private
A : Array of TValue;
procedure TForm1.Grid1GetValue(Sender: TObject; const Col, Row: Integer; var        Value: TValue);
 begin
// Gets the value from a cell in the first column
if Col = 0 then
 Value := A[Row];

procedure TForm1.Button2Click(Sender: TObject);
begin
A[1] := Edit1.Text;
end;
4

1 回答 1

2
//i spent hours just to figure it out,waste of TIME;//

Procedure Formx.StringGrid1SellectCell(Sender: TObject; const ACol,Arow: integer;   var CanSellect: Boolean);
Var
Val: string;
begin
Val := StringGrid1.Cells[ACol, ARow];
Edit1.Text:= Val;
于 2015-08-23T13:06:03.567 回答