Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Put text into clipboard to be fixed font when pasted.
Message
De
13/06/2008 13:07:41
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
13/06/2008 10:17:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01243628
Message ID:
01323911
Vues:
26
>Dragan ---
>
>Have not worked with RTF's before ...
>
>OK, so I've finally been able to find the RTFBox from c:\windows\system32\richtx32.ocx
>
>I don't see a copy method. when I look at its property sheet.
>
>What am I missing?

Sorry, I was wrong - no such method. The RtfBox has many things to facilitate clipboard-like operation, a whole set of sel* properties which you can use. To copy the whole text, you'd actually have to use its .textRtf property. To select a piece of it, you'd have to manipulate the .selstart and .sellength properties, or to rely on .Find() method, which makes the found string selected.

You can search for the string yourself, but you may be off by one - I've just created a form, added a rtf box to it, pasted the paragraph before this into it, and
ortf.Find("to select")
?ortf.seltext
To select
?ortf.selstart
193
?ATC("to select",ortf.text)
194
?ATC("to select",ortf.textrtf)
288
so beware if you intend to clip stuff - RTF box, being an ActiveX, may have its own interpretation of what .selstart means.

Also, practically all the .sel* properties are read-write at runtime; .selAlignment, .selBold, .selIndent etc can be manipulated programmatically.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform