Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > VCL

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 04-28-2012, 04:02 PM
GTunlocker GTunlocker is offline
Junior Member
 
Join Date: Jul 2011
Posts: 15
Default need help about TRxRichedit

hi all

i have some problem

Quote:
procedure Addlog(msg: string; Color: Tcolor; ReadLen: Boolean=false; bold: boolean= false;
begin
rxrichedit.sellatribute.color:= Tcolor;
if bold then rxrichedit.sellatribute.font:= [fsbold];
else rxrichedit.sellatribute.font:=[];
rxrichedit.seltext:=msg;
if readlen then rxrichedit.seltext:=#13#10;
rxrichedit.perform(EM_Scroolset,0,0);
end;
if uses Standart richedit good no prob
but using RxRichedit Problem

i want this log show
addlog('TEST',Clblack,true,true);
addlog('Test',Clred,false,false);

and show in richedit
TEST test = using richedit standart

TEST
test => using RxRichedit

help me
thanks
br
Reply With Quote
  #2  
Old 04-30-2012, 02:49 PM
nester261 nester261 is offline
Moderator
 
Join Date: Jan 2004
Location: UK
Posts: 617
Default

I am not sure how you got this code you posted to work with the Standard TRichEdit as just by looking at it I know it would not compile...

Change the code in your procedure, to this:

Code:
  rxrichedit.SelAttributes.Color := Color;
  if bold then
    rxrichedit.SelAttributes.Style := [fsbold]
  else
    rxrichedit.SelAttributes.Style := [];
  rxrichedit.seltext := msg;
  if ReadLen then
    rxrichedit.seltext := #13#10;
  rxrichedit.perform(EM_SCROLLCARET, 0, 0);
__________________
"Where there's a will, there's always a way."

-- The Hon Robert Nester Marley O.M. - aka Bob Marley!
Reply With Quote
  #3  
Old 05-10-2012, 02:32 PM
GTunlocker GTunlocker is offline
Junior Member
 
Join Date: Jul 2011
Posts: 15
Default

Quote:
Originally Posted by nester261 View Post
I am not sure how you got this code you posted to work with the Standard TRichEdit as just by looking at it I know it would not compile...

Change the code in your procedure, to this:

Code:
  rxrichedit.SelAttributes.Color := Color;
  if bold then
    rxrichedit.SelAttributes.Style := [fsbold]
  else
    rxrichedit.SelAttributes.Style := [];
  rxrichedit.seltext := msg;
  if ReadLen then
    rxrichedit.seltext := #13#10;
  rxrichedit.perform(EM_SCROLLCARET, 0, 0);
your code right but prob seltxt #13#10

if rxrichedit.seltext := #13#10; problem is text no show in rxrichedit
if Rxrichedit.lines.add(#13#10); all text lenght potition
like this

Quote:
TEST: TRUETEST: TRUETEST: TRUETEST: TRUETEST: TRUE
and i want

Quote:
TEST: TRUE
TEST: TRUE
TEST: TRUE
TEST: TRUE
TEST: TRUE
please

br
Reply With Quote
  #4  
Old 05-13-2012, 01:10 AM
nester261 nester261 is offline
Moderator
 
Join Date: Jan 2004
Location: UK
Posts: 617
Default

Just set your ReadLen variable to True!

Like this:

Code:
Addlog('TEST: TRUE',clRed,True,True);
__________________
"Where there's a will, there's always a way."

-- The Hon Robert Nester Marley O.M. - aka Bob Marley!
Reply With Quote
  #5  
Old 05-14-2012, 07:05 AM
GTunlocker GTunlocker is offline
Junior Member
 
Join Date: Jul 2011
Posts: 15
Default

Quote:
Originally Posted by nester261 View Post
Just set your ReadLen variable to True!

Like this:

Code:
Addlog('TEST: TRUE',clRed,True,True);

i have done
if RXrichedit1.seltext:='TEST'; not show in rxrichedit

i think problem is seltext

maybe i will upload my source

in original richedit its fine

addlog('TEST :',clblack,false,false);
addlog('TRUE,clred,true,true);
show in rich edit TEST: TRUE

thanks and best regard
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:38 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2014, vBulletin Solutions, Inc.