procedure TForm1.StringGrid1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
Col, Row: Integer;
sl: TStringList;
i: Integer;
begin
StringGrid1.MouseToCell(X, Y, Col, Row);
if (Col = 0)
and (Row > 0)
and (StringGrid1.Cells[Col, Row] <> '
')
then
begin
IndexFileToOpen := Row - 1;
TempForm := TfrmDisplayFiles.Create(self);
// hier AV!!!
FormList.Add(TempForm);
TfrmDisplayFiles(FormList.Items[FormList.Count - 1]).Show;
TfrmDisplayFiles(FormList.Items[FormList.Count - 1]).BringToFront;
end;
if (Col = StringGrid1.ColCount - 1)
or
(Col = StringGrid1.ColCount - 2)
and
(Row = 0)
then
begin
StringGrid1.SortSettings.Column := Col;
StringGrid1.QSort;
sl := TStringList.Create;
try
for i := 1
to StringGrid1.RowCount - 2
do
begin
sl.Add(StringGrid1.Cells[0, i]);
end;
SortSl(slFiles, sl);
finally
FreeAndNil(sl);
end;
Sorted := True;
mnuUnsort.Enabled := Sorted;
end;
end;