Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Put text into clipboard to be fixed font when pasted.
Message
From
13/06/2008 13:07:41
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
13/06/2008 10:17:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01243628
Message ID:
01323911
Views:
25
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform