Prototype

procedure CopyToClipboard;

Description

Copies the selected text to the clipboard.


Check HasSelection to enable a copy button or menu.

Examples

procedure TForm1.MDViewer1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  bCopy.Enabled := MDViewer1.HasSelection;
end;

procedure TForm1.PopupMenu1Popup(Sender: TObject);
begin
  mCopy.Enabled := MDViewer1.HasSelection;
end;