Ver la Versión Completa : pasar ListView al Clipboard
allende
02-12-2003, 23:50:57
Hola amigos, alguien sabe como pasar el contenido de un ListView al ClipBoard?
gracias
__cadetill
03-12-2003, 10:55:24
esto es para pasar un DBGrid al Portapapeles. Supongo que adaptandolo un poco no te costará mucho
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;
allende
03-12-2003, 19:31:36
gracias
muchas gracias amigo, con esa idea lo implemente para el listview y ya lo tengo funcionando
vBulletin v3.6.8, Derechos ©2000-2024, Jelsoft Enterprises Ltd.