Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot add text to RichTextEdit control

Status
Not open for further replies.

gagar

Technical User
Jun 30, 2005
8
MX
I cannot add any text to a RichTextEdit control, I try:

rte_1.SelectTextAll()
rte_1.Clear()

ls_richtext = "Hello"
rtn = rte_1.PasteRTF(ls_richtext)

but nothing is been added to the control.
I try:
rte_1.SelectText(2,1, 0,0) instead of rte_1.SelectTextAll()

rte_1.PasteRTF(ls_richtext, Detail!) instead of
rte_1.PasteRTF(ls_richtext)

but is not working, any help is appreciated.





 
ls_richtext="Hello" is not a rich text formatted string.

try

ls_richtext = '{\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fnil\fcharset0 Calibri;}}{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang7\f0\fs22 Hello\par}'

hth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top