Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy & paste RTF text
Message
De
07/02/2007 19:38:16
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
01192162
Message ID:
01193462
Vues:
12
Hi Sergey, thanks for the reply.

>It's easy to make RTF control read only. I'm not sure how to acomplish the copy part, though.
>
>WITH Thisform.oRtf.OBJECT
>  .SelStart = 0
>  .SelLength = LEN(.TextRTF)
>  .SelProtected = .T.
>  ...
>ENDWITH
>
Your suggestion worked in as much as it enabled me to highlight rtf text and copy it to the clipboard (using ctrl+c or right-click menu if .AutoVerbMenu=.T.), but when I try and paste the text into another rtf olecontrol I get the error message "OLE IDespatch exception code 0 from RichTextCtrl: The operation cannot be performed on protected text."

From this I am guessing that the copied text includes some hidden formatting denoting that as well as being non-editable, the text is also protected from being pasted elsewhere.

Christof Wollenhaupt alerted me to the .locked property. If set to .T., the rtf control behaves as readonly, and enables me to copy text to the clipboard, then paste into another ole control.

Regards,
Alan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform