ImageEn, unit imageenproc |
|
TImageEnProc.CanPasteFromClipboard
Declaration
function CanPasteFromClipboard(Dest: TIECopyPasteType = iecpAuto; InclImagesAsLayers: Boolean = True): Boolean;
Description
Returns
true if the clipboard contains an image or an ImageEn layer that TImageEnProc can paste.
If
Dest is
iecpSelection then there must also be a valid selection in the associated
TImageEnView.
InclImagesAsLayers has no effect unless
Dest is
iecpLayer. If true, the result will be true if the clipboard contains a layer or an image. If false, the result will be true only if there is a layer on the clipboard.
Note:
◼The
Dest you specify for
CanPasteFromClipboard, should be the same as the
Dest for your call to
CanPasteFromClipboard◼If the TImageEnProc is attached to a TIEBitmap, TImageEnMView or TImageEnFolderMView then only iecpFullImage is relevant (iecpAuto will have the same effect as iecpFullImage. iecpSelection and iecpLayer will always fail)
◼This method supports
PdfViewer if Source = iecpAuto
// Enable the Paste button if pasting is possible
btnPasteFromClip.Enabled := ImageEnView1.Proc.CanPasteFromClipboard();
// Paste only if there is a layer on the clipboard
if ImageEnView1.Proc.CanPasteFromClipboard( iecpLayer, False );
ImageEnView1.Proc.PasteFromClipboard( iecpLayer );
// Paste a layer if there is an image or layer on the clipboard
if ImageEnView1.Proc.CanPasteFromClipboard( iecpLayer );
ImageEnView1.Proc.PasteFromClipboard( iecpLayer );
// Append an image to a TImageEnMView from the clipboard
if IEMView1.Proc.CanPasteFromClipboard() then
begin
IEMView1.AppendImage( 0, 0 );
IEMView1.Proc.PasteFromClipboard();
end;
See Also
◼PasteFromClipboard◼PointPasteFromClip◼LayersCreateFromClipboard◼CanCutToClipboard◼CutToClipboard◼CanCopyToClipboard◼CopyToClipboard