![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
![]() |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#1
|
|||
|
|||
|
pasar ListView al Clipboard
Hola amigos, alguien sabe como pasar el contenido de un ListView al ClipBoard?
gracias |
|
#2
|
|||
|
|||
|
esto es para pasar un DBGrid al Portapapeles. Supongo que adaptandolo un poco no te costará mucho
Código:
const TAB = #9;
var i : Integer;
List : TStrings;
StrList : String;
begin
//*************
// ********* AÑADE ClipBrd EN EL USES DEL FORM
//*************
List := TStringList.Create;
try
StrList := '';
for i := 0 to Pred(RxDBGrid1.FieldCount) Do
StrList := StrList + RxDBGrid1.Columns[i].Title.Caption + TAB;
List.Add(StrList);
Screen.Cursor := crHourGlass;
while not RxDBGrid1.DataSource.DataSet.Eof do
begin
StrList := '';
for i := 0 to Pred(RxDBGrid1.FieldCount) do
StrList := StrList + RxDBGrid1.Fields[i].AsString + TAB;
List.Add(strList);
RxDBGrid1.DataSource.DataSet.Next;
end;
Clipboard.AsText := List.Text;
finally
Screen.Cursor := crDefault;
FreeAndNil(List);
end;
end;
|
|
#3
|
|||
|
|||
|
gracias
muchas gracias amigo, con esa idea lo implemente para el listview y ya lo tengo funcionando |
![]() |
|
|
|