![]() |
StringGrid cellen Inhalt to Clipboard
Mosche
kann mir jemand mal einen Ansatz geben wie ich eine makierte Zelle aus dem StrinGrid Kopieren und wieder in eine andere einfügen kann. Gruß Sascha |
Re: StringGrid cellen Inhalt to Clipboard
Kannst Du den Text nicht einfach zuweisen?
Delphi-Quellcode:
Ungetestet, aber müsste doch gehen.
StringGrid.Cells[1,1] := StringGrid.Cells[2,2];
|
Re: StringGrid cellen Inhalt to Clipboard
Hi,
ich glaube, er meint die Zwischenablage. IIRC:
Delphi-Quellcode:
Ist jetzt aber nicht überprüft.
uses
Clipbrd; Clipboard.AsText := StringGrid.Cells[1, 2]; StringGrid.Cells[2, 1] := Clipboard.AsText; Mfg FAlter |
Re: StringGrid cellen Inhalt to Clipboard
Aber wieso soll das unbedingt über das Clipboard gemacht werden, wenn es auch ohne geht?
|
Re: StringGrid cellen Inhalt to Clipboard
Hab es jetzt mal so versucht aber geht irgendwie nicht
Delphi-Quellcode:
if (ssCtrl in Shift) and (Key = Ord('C')) then
begin sKopieren:= StringGrid1.Cells[StringGrid1.Col,StringGrid1.Row]; end; if (ssCtrl in Shift) and (Key = Ord('V')) then begin sEinfuegen:= StringGrid1.Cells[StringGrid1.Col,StringGrid1.Row]; end; |
Re: StringGrid cellen Inhalt to Clipboard
Delphi-Quellcode:
Macht so in meinen Augen mehr Sinn.
if (ssCtrl in Shift) and (Key = Ord('C')) then
begin sKopieren:= StringGrid1.Cells[StringGrid1.Col,StringGrid1.Row]; end; if (ssCtrl in Shift) and (Key = Ord('V')) then begin StringGrid1.Cells[StringGrid1.Col,StringGrid1.Row] := sKopieren; end; |
Re: StringGrid cellen Inhalt to Clipboard
Sollte das nicht so aussehen:
Delphi-Quellcode:
[edit]Verdammt! Heute isser schnell der Junge[/edit]
if (ssCtrl in Shift) and (Key = Ord('C')) then
begin sKopieren:= StringGrid1.Cells[StringGrid1.Col,StringGrid1.Row]; end; if (ssCtrl in Shift) and (Key = Ord('V')) then begin StringGrid1.Cells[StringGrid1.Col,StringGrid1.Row] := sKopieren; end; |
Re: StringGrid cellen Inhalt to Clipboard
Ha, schneller :tongue:
|
Re: StringGrid cellen Inhalt to Clipboard
Heute Powerfrühstück gehabt? :tongue:
|
Re: StringGrid cellen Inhalt to Clipboard
:wall:
Ja das macht mehr sinn und dann gehts auch danke |
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:06 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz