GSM Shop GSM Shop
GSM-Forum  

Welcome to the GSM-Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features.
Only registered members may post questions, contact other members or search our database of over 8 million posts.

Registration is fast, simple and absolutely free so please - Click to REGISTER!

If you have any problems with the registration process or your account login, please contact contact us .

Go Back   GSM-Forum > Other Gsm/Mobile Related Forums > GSM Programming & Reverse Engineering


GSM Programming & Reverse Engineering Here you can post all Kind of GSM Programming and Reverse Engineering tools and Secrets.

Reply
 
LinkBack Thread Tools Display Modes
Old 03-07-2012, 09:22   #1 (permalink)
Freak Poster
 
Join Date: Jul 2011
Location: Australia/Melbourne
Posts: 122
Member: 1610809
Status: Offline
Sonork: 100.1616347
Thanks Meter: 23
how to change richedit selection color


hi all

help me pleas

uses Richedit;

how to change richedit selection color
select is black, i need blue like Tmemo

br
  Reply With Quote
Old 03-07-2012, 14:57   #2 (permalink)
No Life Poster
 
darmiles's Avatar
 
Join Date: Sep 2005
Location: Resign
Posts: 525
Member: 177036
Status: Offline
Thanks Meter: 934
Donate money to this user
SelStart := GetTextLen;
SelAttributes.Size := 10;
//add one unformatted line
SelText := 'test1' + #13#10;

//add some normal font text
//SelText := 'Formatted lines in RichEdit' + #13#10;
SelText := 'test2';
///SelAttributes.Size := 10;

//add bold + red
SelAttributes.Style := [fsBold];
SelAttributes.Color := clRed;
SelText := ':';
SelAttributes.Style := [fsBold];
SelAttributes.Color := clBlue;
SelText := 'test2';
//only bold
SelAttributes.Color := clGreen;
SelText := 'test3:';
///////////



//add italic + blue
SelAttributes.Style := [fsbold];
SelAttributes.Color := clpurple;
SelText := 'test4';

//new line
SelText := #13#10;

//add normal again
SelAttributes.Style := [fsItalic];
SelAttributes.Size := 10;
SelAttributes.Color := cllime;
SelText := '';

neXt time USE GOOGLE BEFORE MAKING LAZY THREAD LIKE THIS
  Reply With Quote
The Following User Says Thank You to darmiles For This Useful Post:
Old 03-07-2012, 15:09   #3 (permalink)
No Life Poster
 
darmiles's Avatar
 
Join Date: Sep 2005
Location: Resign
Posts: 525
Member: 177036
Status: Offline
Thanks Meter: 934
Donate money to this user
procedure TForm1.Button1Click(Sender: TObject);
BEGIN
with richEdit1 do
begin
Richedit1.clear;

SelStart := GetTextLen;
SelAttributes.Size := 10;
//add one unformatted line
SelText := 'MY NAME IS DARWIN' + #13#10;

//add some normal font text
/////SelText := 'LAZY TEAM' + #13#10;
SelText := 'DARWIN' + #13#10;
//bigger text
///SelAttributes.Size := 10;

//add bold + red
SelAttributes.Style := [fsBold];
SelAttributes.Color := clRed;
SelText := 'DARMILES';
SelAttributes.Style := [fsBold];
SelAttributes.Color := clBlue;
SelText := ''+ #13#10;
//only bold
SelAttributes.Color := clGreen;
SelText := 'LEVEL5TEAM';
///////////



//add italic + blue
SelAttributes.Style := [fsbold];
SelAttributes.Color := clpurple;
SelText := 'GSMHOSTING';

//new line
SelText := #13#10;

//add normal again
SelAttributes.Style := [fsItalic];
SelAttributes.Size := 10;
SelAttributes.Color := cllime;
SelText := '';


SelAttributes.Size := 10;
SelAttributes.Style := [fsItalic];
SelAttributes.Color := clBlue;
SelText := ''#13#10;
SelText :='';

richedit1.lines.add(' ');
SelAttributes.Size := 10;
SelAttributes.Style := [fsbold];
SelAttributes.Color := clfuchsia;
SelText := 'TEST1'#13#10;

end;

end;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
with richEdit1 do
begin
Richedit1.clear;

SelStart := GetTextLen;
SelAttributes.Size := 10;
//add one unformatted line
SelText := 'MY NAME IS DARWIN' + #13#10;

//add some normal font text
/////SelText := 'LAZY TEAM' + #13#10;
SelText := 'DARWIN' + #13#10;
//bigger text
///SelAttributes.Size := 10;

//add bold + red
SelAttributes.Style := [fsBold];
SelAttributes.Color := clRed;
SelText := 'DARMILES';
SelAttributes.Style := [fsBold];
SelAttributes.Color := clBlue;
SelText := ''+ #13#10;
//only bold
SelAttributes.Color := clGreen;
SelText := 'LEVEL5TEAM';
///////////



//add italic + blue
SelAttributes.Style := [fsbold];
SelAttributes.Color := clpurple;
SelText := 'GSMHOSTING';

//new line
SelText := #13#10;

//add normal again
SelAttributes.Style := [fsItalic];
SelAttributes.Size := 10;
SelAttributes.Color := cllime;
SelText := '';


SelAttributes.Size := 10;
SelAttributes.Style := [fsItalic];
SelAttributes.Color := clBlue;
SelText := ''#13#10;
SelText :='';

richedit1.lines.add(' ');
SelAttributes.Size := 10;
SelAttributes.Style := [fsbold];
SelAttributes.Color := clfuchsia;
SelText := 'TEST1'#13#10;

end;
end;
end.
  Reply With Quote
The Following User Says Thank You to darmiles For This Useful Post:
Old 03-07-2012, 16:43   #4 (permalink)
Product Manager
 
orbita's Avatar
 
Join Date: Apr 2002
Location: nckDongle
Posts: 13,325
Member: 11170
Status: Offline
Sonork: 1603694
Thanks Meter: 6,944
edited my message

Last edited by orbita; 03-07-2012 at 16:50.
  Reply With Quote
The Following User Says Thank You to orbita For This Useful Post:
Old 03-07-2012, 18:11   #5 (permalink)
Freak Poster
 
Join Date: Jul 2011
Location: Australia/Melbourne
Posts: 122
Member: 1610809
Status: Offline
Sonork: 100.1616347
Thanks Meter: 23
Quote:
Originally Posted by darmiles View Post
SelStart := GetTextLen;
SelAttributes.Size := 10;
//add one unformatted line
SelText := 'test1' + #13#10;

//add some normal font text
//SelText := 'Formatted lines in RichEdit' + #13#10;
SelText := 'test2';
///SelAttributes.Size := 10;

//add bold + red
SelAttributes.Style := [fsBold];
SelAttributes.Color := clRed;
SelText := ':';
SelAttributes.Style := [fsBold];
SelAttributes.Color := clBlue;
SelText := 'test2';
//only bold
SelAttributes.Color := clGreen;
SelText := 'test3:';
///////////



//add italic + blue
SelAttributes.Style := [fsbold];
SelAttributes.Color := clpurple;
SelText := 'test4';

//new line
SelText := #13#10;

//add normal again
SelAttributes.Style := [fsItalic];
SelAttributes.Size := 10;
SelAttributes.Color := cllime;
SelText := '';

neXt time USE GOOGLE BEFORE MAKING LAZY THREAD LIKE THIS

Thanks darmiles hehe
  Reply With Quote
Old 03-07-2012, 22:44   #6 (permalink)
Freak Poster
 
Join Date: Mar 2009
Posts: 234
Member: 984268
Status: Offline
Thanks Meter: 150
Quote:
Procedure Addlog(S:string;Color:TColor);
var
Posit:Integer;
Time:String;
begin
Time := Timetostr(Now);
Posit := Length(Mainform.Log.Text);
Mainform.Log.Lines.Add('['+Time+'] ' + s);
Mainform.Log.SelStart := Posit;
Mainform.Log.SelLength := length(time)+3;
Mainform.Log.SelAttributes.Color := clhighlight;
Mainform.Log.SelStart := Posit + length(time)+3;
Mainform.Log.SelLength := Length(s);
Mainform.Log.SelAttributes.Color := Color;
Mainform.Log.SelStart := Length(Mainform.Log.Text);
SendMessage(Mainform.Log.handle, EM_SCROLLCARET,0,0);
end;

This Procedure will Show

[time] < clhighlight + String(s) < Color
  Reply With Quote
The Following User Says Thank You to mustipusti For This Useful Post:
Reply

Bookmarks


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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
news headlines to gsm phone mos Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 7 05-22-2016 11:42
How can I do a Welcome note for my 6110 a dosn't have any one ? Viper Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 8 06-27-2015 11:57
How to add a language in 51xx/61xx tati Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 8 05-21-2013 19:20
How to upload a new firmware... Brand Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 8 06-08-2012 18:29
Copy from one 6110 to another Leif Nielsen Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 1 06-10-1999 22:36

 



All times are GMT +1. The time now is 21:49.



Powered by Searchlight © 2024 Axivo Inc.
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
- GSM Hosting Ltd. - 1999-2023 -
Page generated in 0.23017 seconds with 9 queries

SEO by vBSEO