Fix bug #846: Copy to clipboard doesn't copy the entire field contents

This commit is contained in:
Ansgar Becker
2008-11-01 08:52:14 +00:00
parent d47a9643d6
commit cbe5f2467f

View File

@@ -3148,9 +3148,10 @@ begin
then begin
Grid := Sender as TVirtualStringTree;
// TODO: Clipboard.AsText is not Unicode safe!
if Key = Ord('C') then
if Key = Ord('C') then begin
EnsureFullWidth(Grid, Grid.FocusedColumn, Grid.FocusedNode);
CopyToClipboard(Grid.Text[Grid.FocusedNode, Grid.FocusedColumn])
else if Key = Ord('V') then begin
end else if Key = Ord('V') then begin
CB := TUniClipboard.Create;
Grid.Text[Grid.FocusedNode, Grid.FocusedColumn] := CB.AsWideString;
end