RichText in a "classic" TextBox

  • Thread starter Thread starter Alain
  • Start date Start date
A

Alain

Hello

I would be able to read in a Classic Text Box bound to a Memo Field,
assuming that the contents of my Memo Field could be a simple memo text
like:
- "Hello I am Alain" (no RichText coding or enhancement like in an
ordinary memo field contents in Access) => The Text Box should display it
exatly as it is recorded in the Memo field

or it could Be like:

"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharse
t0
Arial;}}{\colortbl;\red255\green0\blue0;\red255\green255\blue0;\red0\green0\
blue255;}\uc1\pard\ulnone\f0\fs20 Test \cf1\b RTF a \cf2 different \cf3
record\par}"
(RichText Coded, The message coud be display with every RichText
functionnality in an RTF control)

I would like my Memo field to display only the text without any RichText
enhancement and let the user read "Test RTF a different record" in my text
box.

Is there anybody how knows how to "extract" the text (by example: "Test RTF
a different record")
from the contend of the memo field
-
(""{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fprq2\fchar
set0
Arial;}}{\colortbl;\red255\green0\blue0;\red255\green255\blue0;\red0\green0\
blue255;}\uc1\pard\ulnone\f0\fs20 Test \cf1\b RTF a \cf2 different \cf3
record\par}")

many thanks for your help

regards
Alain
 
The RTF ActiveX control has a plain Text property. Is your form set to
Single or Continuous view?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Hello Stephen

My form is set to continuous view.
We have open a discussion on the access.formscoding forum about what I want
to do, but
as our exchange is still open let me resume my problem.

I am using Access 2K
I have an application with a form set to continuous whith a TextBox linked
to a memo field of my Table.
I would like to "stick an RTF control on a seperate form set to simple mode.
From the Double Click event of the TextBox bound to the Memo field on the
form set to Continuous view, simply popup the RTF form passing the current
Memo field's contents to the unbound RTF control. (I already do that but
without RTF control, oly to have a better size to type or read my memo
field)

A key point is to visualize the text (without any rich text functionnality)
in the memo box, and to visualize the text with "full Reach Text
functionnality" in the RTF form in both following cases:
- the contend of my TextBox (ie memo field in the source table )is a
"non rich text" text (Exemple : "Test RTF a different record)
- the contend of my TextBox (ie meom field in th source table) is a
"Rich Text" text (Exemple :
"{\rtf1\ansi\ansicpg1252\deff0\deflang1033
{\fonttbl{\f0\fswiss\fprq2\fcharset0

Arial;}}{\colortbl;\red255\green0\blue0;\red255\green255\blue0;\red0\green0\
blue255;}
\uc1\pard\ulnone\f0\fs20 Test \cf1\b RTF a \cf2 different \cf3
record\par}"

Let me know if you need more explanations

I thing it could be a good solution (an maybe the only one) to have the
benefits of your RTF control in a continuous form

best regards
Alain
 
Back
Top