Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rtf control
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
00770236
Message ID:
00770503
Vues:
16
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform