[Lazarus] stringgrid copytoclipboard
Jesus Reyes
jesusrmx at yahoo.com.mx
Tue May 18 16:07:11 CEST 2010
--- El lun 17-may-10, Andrea Mauri <andrea.mauri.75 at gmail.com> escribió:
> De: Andrea Mauri <andrea.mauri.75 at gmail.com>
> Asunto: [Lazarus] stringgrid copytoclipboard
> A: "Lazarus mailing list" <lazarus at lists.lazarus.freepascal.org>
> Fecha: lunes, 17 de mayo de 2010, 9:15
> Lazarus 0.9.29 r25476 FPC 2.4.0
> i386-win32-win32/win64
>
> If I put a TStringGrid on a form and then in Form Click
> event I put:ù
>
> procedure TForm1.FormClick(Sender: TObject);
> begin
> StringGrid1.CopyToClipboard(False);
> end;
>
> I properly get the stringgrid in the clipboard if the
> stringgrid is filled as follows:
>
> procedure TForm1.FormCreate(Sender: TObject);
> begin
> StringGrid1.cells[0, 1]:= '1';
> StringGrid1.cells[0, 2]:= '2';
>
> StringGrid1.ColCount:= 3;
> StringGrid1.cells[1, 0]:= 'a';
> StringGrid1.cells[1, 1]:= '1';
>
> StringGrid1.cells[2, 1]:= '2';
> StringGrid1.cells[2, 0]:= 'b';
> end;
>
> Otherwise if I use the following code the grid is filled
> identically but when I copy it to the clipboard the titles
> are missing.
>
> procedure TForm1.FormCreate(Sender: TObject);
> begin
> StringGrid1.cells[0, 1]:= '1';
> StringGrid1.cells[0, 2]:= '2';
>
> StringGrid1.Columns.Add;
> StringGrid1.Columns[0].Title.Caption:= 'a';
> StringGrid1.Cells[1, 1]:= '1';
> StringGrid1.Columns.Add;
> StringGrid1.Columns[1].Title.Caption:= 'b';
> StringGrid1.Cells[2, 1]:= '2';
> end;
>
> regards,
> andrea
>
>
>
> --
This is a bug, please submit a bug report.
Jesus Reyes A.
More information about the Lazarus
mailing list