Hallo Sascha,
wenn die Anzeige unbedingt permament aktualisiert werden soll, dann so:
Delphi-Quellcode:
function ColsToStr(sg: TStringGrid; colNums: array of Integer): string;
var
iCol, iRow: Integer;
s: string;
begin
with TStringList.Create do
try
Sorted := True;
for iCol := Low(colNums) to High(colNums) do
for iRow := sg.FixedRows to Pred(sg.RowCount) do
begin
s := Trim(sg.Cols[colNums[iCol]][iRow]);
if (s <> '') and (IndexOf(s) < 0) then
Add(s);
end;
Result := CommaText;
finally
Free;
end;
end;
procedure TForm1.StringGridSetEditText(Sender: TObject; ACol,
ARow: Integer; const Value: String);
begin
Edit1.Text := ColsToStr(StringGrid, [11, 12]);
end;
Freundliche Grüße