voodoo22
asked on
question about textRTF property
This question is for anyone that is familiar with both delphi and vb.
I am trying to port a vb app over to delphi and in the source code for the vb app they use the textRTF property of a RichTextBox control and not being a vb guru I went to MSDN and looked it up and it gave me this explanation of what it was.
"Returns or sets the text of a RichTextBox control, including all .rtf code."
which did not really help me alot so I thought I would come here and ask the experts for more info and more importanly if there is a Delphi equivalent for the textRTF property.
btw if anyone is interested this is the msdn page I looked at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rtfbox98/html/vbprotextrtf.asp
Pete
I am trying to port a vb app over to delphi and in the source code for the vb app they use the textRTF property of a RichTextBox control and not being a vb guru I went to MSDN and looked it up and it gave me this explanation of what it was.
"Returns or sets the text of a RichTextBox control, including all .rtf code."
which did not really help me alot so I thought I would come here and ask the experts for more info and more importanly if there is a Delphi equivalent for the textRTF property.
btw if anyone is interested this is the msdn page I looked at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rtfbox98/html/vbprotextrtf.asp
Pete
Sorry, Then you read in using the TRichEdit.lines.LoadFromFI le
Shane
Shane
You can use the Line.LoadFromFile or the line.LoadFromStream. If you have rtf formatted text, you can save this to a stream (TMemoryStream, TStringStream) then have the RIchEdit control load it by using Lines.LoadFromStream(Strea mObject).
Regards,
Russell
eg:
var Strm: TMemoryStream;
begin
RichEdit1.Lines.LoadFromFi le('c:\del phi5\demos \richedit\ overview.r tf');
Strm:=TMemoryStream.Create ;
RichEdit1.Lines.SaveToStre am(Strm);
ShowMessage(PChar(Strm.Mem ory));
Strm.Position:=0;
RichEdit1.Lines.LoadFromSt ream(Strm) ;
end;
Regards,
Russell
eg:
var Strm: TMemoryStream;
begin
RichEdit1.Lines.LoadFromFi
Strm:=TMemoryStream.Create
RichEdit1.Lines.SaveToStre
ShowMessage(PChar(Strm.Mem
Strm.Position:=0;
RichEdit1.Lines.LoadFromSt
end;
ASKER
let me see if i get this right. Using the text property would return the text as it was and using the textRTF would return the RTF Table for the text ???
textRTF would return plain text with format codes
Shane
.text, would return plain text without any formatting
Shane
Shane
ASKER
ok then obviously my next question is what do you mean by format codes the fsBold , fsUnderline stuff or something else ... could you provide an example of what is returned so I can see what I can expect. I don't need any code just what it would look like.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There you go - Russell Gave you everything you need!
<SMILE>
Shane
<SMILE>
Shane
ASKER
Thanks for the comments but now I am more lost then when I first asked the question and although the comments have not helped me understand this any better I have to award the point so I will just split them up between you guys.
voodoo22,
We would have helped you to understand better. Do you still want help?
Shane
We would have helped you to understand better. Do you still want help?
Shane
ASKER
I do need help thats true but I did not want to waste any more of your guys time with a simple 100 point question but if your willing to then the problem I am having is I don't know how you got all that formatting from the richedit control because when I saved the contents of the control to a text file this is all that showed up.
{\rtf1\ansi\ansicpg1252\de ff0\deflan g1033\defl angfe1033{ \fonttbl{\ f0\froman\ fprq2\fcha rset0 Times New Roman;}}
\viewkind4\uc1\pard\b\f0\f s24 Hello\b0 , My \i Name\i0 is \ul Shane\ulnone !
\par }
and when I reloaded it up into the richedit control it showed up exactly the same as yours did so again I have no idea how you got more then I did.
And as far as rlibbys comment / code goes I have no clue how use it. I am just hobbiest programmer (if you can call me that) and not been doing this for very long and I have never had any training on programmig of any kind and I simply don't know about classes and casting and all that stuff.
{\rtf1\ansi\ansicpg1252\de
\viewkind4\uc1\pard\b\f0\f
\par }
and when I reloaded it up into the richedit control it showed up exactly the same as yours did so again I have no idea how you got more then I did.
And as far as rlibbys comment / code goes I have no clue how use it. I am just hobbiest programmer (if you can call me that) and not been doing this for very long and I have never had any training on programmig of any kind and I simply don't know about classes and casting and all that stuff.
voodoo22....
First, if you didn't understand, you should have asked further questions; not assigned a B grade for this question.
The meaning of TextRTF is the tokenized text that makes up an RTF file. The rich text format (RTF) IS string data, but contains tokens
that must be converted to the appropriate formatting type (such as language, paragraphs, colors, fonts, etc..). As Shane
desribed to you, an example of TextRTF text might look like the following:
<start>
{\rtf1\ansi\ansicpg1252\uc
{\f37\froman\fcharset204\f
<etc...>
This "string" data is run through a converter to apply the correct code page, font, color, paragraph, etc formatting
in the edit window when displayed.
The "Text" property of the RTF file is the raw text that is displayed. Think of it as the output text, minus the paragraph/color/font/etc formatting that is
applied to it when converted from RTF.
----
Russell
OK,
First, From Delphi, Create a New Component by doing the folowing: (From the main menu)
File --> New --> Other
From the "New" tab, double click on "Component" (to create a new component).
A New Component Dialog Box Appears:
Select from the Ancestor Type drop down, TRichEdit (or type it in.
In my Delphi 7, it is listed as "TRichEdit [ComCtrls]"
Change Class name to : "TEXtRichEdit1" (no quotes of course)
Click the install button
You wan to install into new package, so select the new package tab
Browse to your Delphi\Lib folder
Misc
and click the open Button
then OK
then "yes" to Build
Now, in the Unit you have there unit ExtRichEdit1;
Fill in all the rest of the code as Russell laid out for you above.
You can cust & paste alot of it.
The Compile and you are ready to go, you have a RichEdit for Delphi comparable to your VB one.
Let us know if you get stuck
Shane
Shane
First, From Delphi, Create a New Component by doing the folowing: (From the main menu)
File --> New --> Other
From the "New" tab, double click on "Component" (to create a new component).
A New Component Dialog Box Appears:
Select from the Ancestor Type drop down, TRichEdit (or type it in.
In my Delphi 7, it is listed as "TRichEdit [ComCtrls]"
Change Class name to : "TEXtRichEdit1" (no quotes of course)
Click the install button
You wan to install into new package, so select the new package tab
Browse to your Delphi\Lib folder
Misc
and click the open Button
then OK
then "yes" to Build
Now, in the Unit you have there unit ExtRichEdit1;
Fill in all the rest of the code as Russell laid out for you above.
You can cust & paste alot of it.
The Compile and you are ready to go, you have a RichEdit for Delphi comparable to your VB one.
Let us know if you get stuck
Shane
Shane
OK, Now when you have the new TRichEdit (TExtRichEdit) on your Component Pallete, you can use it as Russell laid out:
Shane
And example usage
--------------------------
begin
ExtRichEdit1.Lines.LoadFro mFile('c:\ delphi5\de mos\riched it\overvie w.rtf');
with TExtRichEditCast.Create(Ri chEdit1) do
begin
ShowMessage(TextRTF);
ShowMessage(Text);
Free;
end;
end;
Shane
And example usage
--------------------------
begin
ExtRichEdit1.Lines.LoadFro
with TExtRichEditCast.Create(Ri
begin
ShowMessage(TextRTF);
ShowMessage(Text);
Free;
end;
end;
ASKER
Ok I did all that and it all seemed to go smoothly until it was time to compile the unit which turned up the following errors.
[Error] EXtRichEdit1.pas(10): ',' or ':' expected but '=' found
[Error] EXtRichEdit1.pas(35): 'END' expected but 'IMPLEMENTATION' found
[Error] EXtRichEdit1.pas(37): Undeclared identifier: 'TRichEditCast'
[Error] EXtRichEdit1.pas(41): This form of method call only allowed in methods of derived types
[Error] EXtRichEdit1.pas(44): Undeclared identifier: 'FSelf'
[Error] EXtRichEdit1.pas(48): Declaration of 'TRichEditCast' differs from previous declaration
[Error] EXtRichEdit1.pas(52): This form of method call only allowed in methods of derived types
[Error] EXtRichEdit1.pas(56): Identifier redeclared: 'TRichEditCast'
[Error] EXtRichEdit1.pas(59): Undeclared identifier: 'FPlainText'
[Error] EXtRichEdit1.pas(59): Undeclared identifier: 'FSelf'
[Error] EXtRichEdit1.pas(63): Identifier redeclared: 'TRichEditCast'
[Error] EXtRichEdit1.pas(66): Undeclared identifier: 'FSelf'
[Error] EXtRichEdit1.pas(66): Undeclared identifier: 'FPlainText'
[Error] EXtRichEdit1.pas(70): Identifier redeclared: 'TRichEditCast'
[Error] EXtRichEdit1.pas(74): Undeclared identifier: 'SaveState'
[Error] EXtRichEdit1.pas(76): Undeclared identifier: 'FSelf'
[Error] EXtRichEdit1.pas(77): Undeclared identifier: 'Value'
[Error] EXtRichEdit1.pas(79): Missing operator or semicolon
[Error] EXtRichEdit1.pas(84): Undeclared identifier: 'RestoreState'
[Error] EXtRichEdit1.pas(89): Identifier redeclared: 'TRichEditCast'
[Error] EXtRichEdit1.pas(93): Undeclared identifier: 'SaveState'
[Error] EXtRichEdit1.pas(95): Undeclared identifier: 'FSelf'
[Error] EXtRichEdit1.pas(96): Undeclared identifier: 'Value'
[Error] EXtRichEdit1.pas(98): Missing operator or semicolon
[Error] EXtRichEdit1.pas(103): Undeclared identifier: 'RestoreState'
[Error] EXtRichEdit1.pas(108): Function needs result type
[Error] EXtRichEdit1.pas(112): Undeclared identifier: 'SaveState'
[Error] EXtRichEdit1.pas(114): Undeclared identifier: 'FSelf'
[Error] EXtRichEdit1.pas(117): Missing operator or semicolon
[Error] EXtRichEdit1.pas(123): Undeclared identifier: 'RestoreState'
[Error] EXtRichEdit1.pas(128): Function needs result type
[Error] EXtRichEdit1.pas(132): Undeclared identifier: 'SaveState'
[Error] EXtRichEdit1.pas(134): Undeclared identifier: 'FSelf'
[Error] EXtRichEdit1.pas(137): Missing operator or semicolon
[Error] EXtRichEdit1.pas(143): Undeclared identifier: 'RestoreState'
[Hint] EXtRichEdit1.pas(13): Private symbol 'FSelf' declared but never used
[Hint] EXtRichEdit1.pas(14): Private symbol 'FPlainText' declared but never used
[Error] EXtRichEdit1.pas(17): Unsatisfied forward or external declaration: '.2.SaveState'
[Error] EXtRichEdit1.pas(18): Unsatisfied forward or external declaration: '.2.RestoreState'
[Error] EXtRichEdit1.pas(19): Unsatisfied forward or external declaration: '.2.SetText'
[Error] EXtRichEdit1.pas(20): Unsatisfied forward or external declaration: '.2.SetTextRTF'
[Error] EXtRichEdit1.pas(21): Unsatisfied forward or external declaration: '.2.GetText'
[Error] EXtRichEdit1.pas(22): Unsatisfied forward or external declaration: '.2.GetTextRTF'
[Error] EXtRichEdit1.pas(25): Unsatisfied forward or external declaration: '.2.Create'
[Error] EXtRichEdit1.pas(26): Unsatisfied forward or external declaration: '.2.Destroy'
[Error] EXtRichEdit1.pas(33): Unsatisfied forward or external declaration: 'TEXtRichEdit1.Register'
[Fatal Error] Misc.dpk(33): Could not compile used unit 'EXtRichEdit1.pas'
and here is the contents of the unit.....................
unit EXtRichEdit1;
interface
uses
Windows, Messages, SysUtils, Classes, Controls, StdCtrls, ComCtrls;
type
TEXtRichEdit1 = class(TRichEdit)
TRichEditCast = class(TObject)
private
{ Private declarations }
FSelf: TRichEdit;
FPlainText: Boolean;
protected
{ Protected declarations }
procedure SaveState;
procedure RestoreState;
procedure SetText(Value: String);
procedure SetTextRTF(Value: String);
function GetText: String;
function GetTextRTF: String;
public
{ Public declarations }
constructor Create(RichEditCtl: TRichEdit);
destructor Destroy; override;
property Text: String read GetText write SetText;
property TextRTF: String read GetTextRTF write SetTextRTF;
published
{ Published declarations }
end;
procedure Register;
implementation
constructor TRichEditCast.Create(RichE ditCtl: TRichEdit);
begin
// Perform inherited
inherited Create;
// Set reference
FSelf:=RichEditCtl;
end;
destructor TRichEditCast.Destroy;
begin
// Perform inherited
inherited Destroy;
end;
procedure TRichEditCast.SaveState;
begin
FPlainText:=FSelf.PlainTex t;
end;
procedure TRichEditCast.RestoreState ;
begin
FSelf.PlainText:=FPlainTex t;
end;
procedure TRichEditCast.SetText(Valu e: String);
var stream: TStringStream;
begin
SaveState;
try
FSelf.PlainText:=True;
stream:=TStringStream.Crea te(Value);
try
FSelf.Lines.LoadFromStream (stream);
finally
stream.Free;
end;
finally
RestoreState;
end;
end;
procedure TRichEditCast.SetTextRTF(V alue: String);
var stream: TStringStream;
begin
SaveState;
try
FSelf.PlainText:=False;
stream:=TStringStream.Crea te(Value);
try
FSelf.Lines.LoadFromStream (stream);
finally
stream.Free;
end;
finally
RestoreState;
end;
end;
function TRichEditCast.GetText: String;
var stream: TStringStream;
begin
SaveState;
try
FSelf.PlainText:=True;
stream:=TStringStream.Crea te('');
try
FSelf.Lines.SaveToStream(s tream);
result:=stream.DataString;
finally
stream.Free;
end;
finally
RestoreState;
end;
end;
function TRichEditCast.GetTextRTF: String;
var stream: TStringStream;
begin
SaveState;
try
FSelf.PlainText:=False;
stream:=TStringStream.Crea te('');
try
FSelf.Lines.SaveToStream(s tream);
result:=stream.DataString;
finally
stream.Free;
end;
finally
RestoreState;
end;
end;
procedure Register;
begin
RegisterComponents('sample s', [TEXtRichEdit1]);
end;
end.
[Error] EXtRichEdit1.pas(10): ',' or ':' expected but '=' found
[Error] EXtRichEdit1.pas(35): 'END' expected but 'IMPLEMENTATION' found
[Error] EXtRichEdit1.pas(37): Undeclared identifier: 'TRichEditCast'
[Error] EXtRichEdit1.pas(41): This form of method call only allowed in methods of derived types
[Error] EXtRichEdit1.pas(44): Undeclared identifier: 'FSelf'
[Error] EXtRichEdit1.pas(48): Declaration of 'TRichEditCast' differs from previous declaration
[Error] EXtRichEdit1.pas(52): This form of method call only allowed in methods of derived types
[Error] EXtRichEdit1.pas(56): Identifier redeclared: 'TRichEditCast'
[Error] EXtRichEdit1.pas(59): Undeclared identifier: 'FPlainText'
[Error] EXtRichEdit1.pas(59): Undeclared identifier: 'FSelf'
[Error] EXtRichEdit1.pas(63): Identifier redeclared: 'TRichEditCast'
[Error] EXtRichEdit1.pas(66): Undeclared identifier: 'FSelf'
[Error] EXtRichEdit1.pas(66): Undeclared identifier: 'FPlainText'
[Error] EXtRichEdit1.pas(70): Identifier redeclared: 'TRichEditCast'
[Error] EXtRichEdit1.pas(74): Undeclared identifier: 'SaveState'
[Error] EXtRichEdit1.pas(76): Undeclared identifier: 'FSelf'
[Error] EXtRichEdit1.pas(77): Undeclared identifier: 'Value'
[Error] EXtRichEdit1.pas(79): Missing operator or semicolon
[Error] EXtRichEdit1.pas(84): Undeclared identifier: 'RestoreState'
[Error] EXtRichEdit1.pas(89): Identifier redeclared: 'TRichEditCast'
[Error] EXtRichEdit1.pas(93): Undeclared identifier: 'SaveState'
[Error] EXtRichEdit1.pas(95): Undeclared identifier: 'FSelf'
[Error] EXtRichEdit1.pas(96): Undeclared identifier: 'Value'
[Error] EXtRichEdit1.pas(98): Missing operator or semicolon
[Error] EXtRichEdit1.pas(103): Undeclared identifier: 'RestoreState'
[Error] EXtRichEdit1.pas(108): Function needs result type
[Error] EXtRichEdit1.pas(112): Undeclared identifier: 'SaveState'
[Error] EXtRichEdit1.pas(114): Undeclared identifier: 'FSelf'
[Error] EXtRichEdit1.pas(117): Missing operator or semicolon
[Error] EXtRichEdit1.pas(123): Undeclared identifier: 'RestoreState'
[Error] EXtRichEdit1.pas(128): Function needs result type
[Error] EXtRichEdit1.pas(132): Undeclared identifier: 'SaveState'
[Error] EXtRichEdit1.pas(134): Undeclared identifier: 'FSelf'
[Error] EXtRichEdit1.pas(137): Missing operator or semicolon
[Error] EXtRichEdit1.pas(143): Undeclared identifier: 'RestoreState'
[Hint] EXtRichEdit1.pas(13): Private symbol 'FSelf' declared but never used
[Hint] EXtRichEdit1.pas(14): Private symbol 'FPlainText' declared but never used
[Error] EXtRichEdit1.pas(17): Unsatisfied forward or external declaration: '.2.SaveState'
[Error] EXtRichEdit1.pas(18): Unsatisfied forward or external declaration: '.2.RestoreState'
[Error] EXtRichEdit1.pas(19): Unsatisfied forward or external declaration: '.2.SetText'
[Error] EXtRichEdit1.pas(20): Unsatisfied forward or external declaration: '.2.SetTextRTF'
[Error] EXtRichEdit1.pas(21): Unsatisfied forward or external declaration: '.2.GetText'
[Error] EXtRichEdit1.pas(22): Unsatisfied forward or external declaration: '.2.GetTextRTF'
[Error] EXtRichEdit1.pas(25): Unsatisfied forward or external declaration: '.2.Create'
[Error] EXtRichEdit1.pas(26): Unsatisfied forward or external declaration: '.2.Destroy'
[Error] EXtRichEdit1.pas(33): Unsatisfied forward or external declaration: 'TEXtRichEdit1.Register'
[Fatal Error] Misc.dpk(33): Could not compile used unit 'EXtRichEdit1.pas'
and here is the contents of the unit.....................
unit EXtRichEdit1;
interface
uses
Windows, Messages, SysUtils, Classes, Controls, StdCtrls, ComCtrls;
type
TEXtRichEdit1 = class(TRichEdit)
TRichEditCast = class(TObject)
private
{ Private declarations }
FSelf: TRichEdit;
FPlainText: Boolean;
protected
{ Protected declarations }
procedure SaveState;
procedure RestoreState;
procedure SetText(Value: String);
procedure SetTextRTF(Value: String);
function GetText: String;
function GetTextRTF: String;
public
{ Public declarations }
constructor Create(RichEditCtl: TRichEdit);
destructor Destroy; override;
property Text: String read GetText write SetText;
property TextRTF: String read GetTextRTF write SetTextRTF;
published
{ Published declarations }
end;
procedure Register;
implementation
constructor TRichEditCast.Create(RichE
begin
// Perform inherited
inherited Create;
// Set reference
FSelf:=RichEditCtl;
end;
destructor TRichEditCast.Destroy;
begin
// Perform inherited
inherited Destroy;
end;
procedure TRichEditCast.SaveState;
begin
FPlainText:=FSelf.PlainTex
end;
procedure TRichEditCast.RestoreState
begin
FSelf.PlainText:=FPlainTex
end;
procedure TRichEditCast.SetText(Valu
var stream: TStringStream;
begin
SaveState;
try
FSelf.PlainText:=True;
stream:=TStringStream.Crea
try
FSelf.Lines.LoadFromStream
finally
stream.Free;
end;
finally
RestoreState;
end;
end;
procedure TRichEditCast.SetTextRTF(V
var stream: TStringStream;
begin
SaveState;
try
FSelf.PlainText:=False;
stream:=TStringStream.Crea
try
FSelf.Lines.LoadFromStream
finally
stream.Free;
end;
finally
RestoreState;
end;
end;
function TRichEditCast.GetText: String;
var stream: TStringStream;
begin
SaveState;
try
FSelf.PlainText:=True;
stream:=TStringStream.Crea
try
FSelf.Lines.SaveToStream(s
result:=stream.DataString;
finally
stream.Free;
end;
finally
RestoreState;
end;
end;
function TRichEditCast.GetTextRTF: String;
var stream: TStringStream;
begin
SaveState;
try
FSelf.PlainText:=False;
stream:=TStringStream.Crea
try
FSelf.Lines.SaveToStream(s
result:=stream.DataString;
finally
stream.Free;
end;
finally
RestoreState;
end;
end;
procedure Register;
begin
RegisterComponents('sample
end;
end.
First, the "wrapper" i gave you was so you didn't have to create a new component (as you see above, it inherits from TObject),
It is not an OO extension to the original, although it could be used that way. If you wish to use it as an OO component extension, then
the correct declarations would be as follows:
unit ExtRichEdit;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls;
type
TExtRichEdit = class(TRichEdit)
private
// Private declarations
FPlainText: Boolean;
protected
// Protected declarations
procedure SaveState;
procedure RestoreState;
procedure SetText(Value: String);
procedure SetTextRTF(Value: String);
function GetText: String;
function GetTextRTF: String;
public
// Public declarations
published
// Published declarations
property Text: String read GetText write SetText;
property TextRTF: String read GetTextRTF write SetTextRTF;
end;
procedure Register;
implementation
procedure TExtRichEdit.SaveState;
begin
FPlainText:=PlainText;
end;
procedure TExtRichEdit.RestoreState;
begin
PlainText:=FPlainText;
end;
procedure TExtRichEdit.SetText(Value
var stream: TStringStream;
begin
SaveState;
try
PlainText:=True;
stream:=TStringStream.Crea
try
Lines.LoadFromStream(strea
finally
stream.Free;
end;
finally
RestoreState;
end;
end;
procedure TExtRichEdit.SetTextRTF(Va
var stream: TStringStream;
begin
SaveState;
try
PlainText:=False;
stream:=TStringStream.Crea
try
Lines.LoadFromStream(strea
finally
stream.Free;
end;
finally
RestoreState;
end;
end;
function TExtRichEdit.GetText: String;
var stream: TStringStream;
begin
SaveState;
try
PlainText:=True;
stream:=TStringStream.Crea
try
Lines.SaveToStream(stream)
result:=stream.DataString;
finally
stream.Free;
end;
finally
RestoreState;
end;
end;
function TExtRichEdit.GetTextRTF: String;
var stream: TStringStream;
begin
SaveState;
try
PlainText:=False;
stream:=TStringStream.Crea
try
Lines.SaveToStream(stream)
result:=stream.DataString;
finally
stream.Free;
end;
finally
RestoreState;
end;
end;
procedure Register;
begin
RegisterComponents('Win32'
end;
end.
-----------
Menu | component/install component/dialog button Browse (for Unit file name)/ Select ExtRichEdit.pas (from where ever you saved it)
Compile the packge; if the dialog does not indicate that TExtRichEdit was installed, then click the "Install" button for the package dialog.
Once installed, you will find the TExtRichEdit component on the Win32 tab of the ide. This can be dropped on the form (instead of TRichEdit).
The component will have all of the TRichEdit properites, as well as the Text and TextRTF properties exposed by the descendant class.
Russell
ASKER
Ok I installed the component and ran this code on a button
procedure TForm1.Button1Click(Sender : TObject);
begin
ExtRichEdit1.Lines.LoadFro mFile('goo f.txt');
ShowMessage(ExtRichEdit1.T extRTF);
ShowMessage(ExtRichEdit1.T ext);
end;
goof.txt contained all those RTF codes that shane posted above but when I clicked on the button all that showed in the message box was
{\rtf1\ansi\ansicpg1252\de ff0\deflan g1033\defl angfe1033{ \fonttbl{\ f0\froman\ fprq2\fcha rset0 Times New Roman;}}
\viewkind4\uc1\pard\b\f0\f s24 Hello\b0 , My \i Name\i0 is \ul Shane\ulnone !
\par }
which is obviously not the same thing as what he has above but oddly enough it is the exact same thing I posted above
so which one is correct and don't worry I am going to open a new blank question and award you another 100 points once
I get this thing figured out.
procedure TForm1.Button1Click(Sender
begin
ExtRichEdit1.Lines.LoadFro
ShowMessage(ExtRichEdit1.T
ShowMessage(ExtRichEdit1.T
end;
goof.txt contained all those RTF codes that shane posted above but when I clicked on the button all that showed in the message box was
{\rtf1\ansi\ansicpg1252\de
\viewkind4\uc1\pard\b\f0\f
\par }
which is obviously not the same thing as what he has above but oddly enough it is the exact same thing I posted above
so which one is correct and don't worry I am going to open a new blank question and award you another 100 points once
I get this thing figured out.
ASKER
Nvm I got the program working thx for your help again.
.Text property and a .TextRTF property. The .TextRTF property will return
the text and all the associated format codes, which you can read in with your TRichEdit in delphi.
Shane