CanCopy: Boolean;
CanCopy(): boolean;
The CanCopy method returns whether the element can be copied to the clipboard.
Available values:
True. Element can be copied. Use the IRdsDictionaryBox.Copy method to copy an element.
False. Element cannot be copied.
Executing the example requires a form containing:
The RdsDictionaryBox component with the RdsDictionaryBox1 identifier.
The UiRdsDictionary component that contains a loaded MDM dictionary used as a data source for RdsDictionaryBox1.
Sub CopyPaste;
Begin
If RdsDictionaryBox1.CanCopy Then
RdsDictionaryBox1.Copy;
End If;
RdsDictionaryBox1.FocusedElement := -2;
If RdsDictionaryBox1.CanPaste Then
RdsDictionaryBox1.Paste;
End If;
End Sub CopyPaste;
Example execution result: an attempt to copy element to the clipboard and paste it.
Executing the example requires a .NET form that contains:
The RdsDictionaryBoxNet component with the rdsDictionaryBoxNet1 identifier.
The UiRdsDictionaryNet component that contains a loaded MDM dictionary used as a data source for rdsDictionaryBoxNet1.
Public Sub CopyPaste();
Begin
If rdsDictionaryBoxNet1.CtrlBox.CanCopy() Then
rdsDictionaryBoxNet1.CtrlBox.Copy();
End If;
rdsDictionaryBoxNet1.CtrlBox.FocusedElement := -2;
If rdsDictionaryBoxNet1.CtrlBox.CanPaste() Then
rdsDictionaryBoxNet1.CtrlBox.Paste();
End If;
End Sub CopyPaste;
Example execution result: an attempt to copy element to the clipboard and paste it.
See also: