guides:programming:programmers_reference_manual:rtftext

RTFTEXT Property

Edit box.

Set and retrieve RTF text from an edit box which has the Rich Editor property set.

When using Get_Property, RTF will be returned regardless of whether the text was formatted using RTF code or using the SetCharFormat message.

rtftext = Get_Property(objectname,”RTFTEXT”)

existingrtftext = Set_Property(objectname,”RTFTEXT”, text)

Values passed in Set_Property():

ValueDescription
textRTF formatted text.

Values returned by Get_Property and Set_Property

ValueDescription
rtftextThe RTF text within the edit box. The text returned is CRLF delimited.
existingrtftextThe existing RTF text, when Set_Property was run.

SetCharFormat message

Declare function Get_Property, Set_Property

rtftext = '{\rtf1\ansi\ansicpg1252\deff0\deflang1033'

rtftext:= '{\fonttbl{\f0\fswiss\fcharset0 Arial;}}'

rtftext:= '{\*\generator Msftedit 5.41.15.1507;}'

rtftext:= '\viewkind4\uc1\pard\f0\fs20 '

rtftext:= 'This is line of text with a \b bold\b0'

rtftext:= ' \i italicized\i0  \b\i word\b0\i0 .'

rtftext:= '\par}'

x = Set_Property(@window:'.EDITBOX','RTFTEXT',rtftext)
 
  • guides/programming/programmers_reference_manual/rtftext.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1