Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rtf control
Message
 
 
To
26/03/2003 10:42:30
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00770236
Message ID:
00770503
Views:
17
This message has been marked as the solution to the initial question of the thread.
You can use SelRtf property to do that. It replaces text in the current selection. If ther's no selection, it inserts text at the current cursor position.
THIS.rtfControl.TextRTF.SelRtf = lcAddText
>Hello,
>
>I try to insert text into an RTF control at the cursor position, but this seems to be more difficult than I expected.
>
>The code I tried is:
>
>
THIS.rtfControl.TextRTF = ;
>   SUBSTR(THIS.rtfControl.TextRTF,1, ;
>   THIS.rtfControl.SelStart) + ;
>   lcAddText + ;
>   SUBSTR(THIS.rtfControl.TextRTF,THIS.rtfControl.SelStart + 1)
>
>Now the SELSTART property does not correspond to the cursor position in relation to the TextRTF value. So I would have to use THIS.rtfControl.Text instead of TextRTF, but then I loose all RTF formatting!
>
>Any ideas how to do this?
>
>Thanks for your help in advance.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform