Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Formating text style in DBRichEdit

Posted on 1998-03-08
1
Medium Priority
?
634 Views
Last Modified: 2013-11-22
My application has a DBRichEdit control. How do I select individual words that I want to highlight in bold or italics (ie change the word/s I have selected with the mouse to a different font.style).

Thanks
JE
0
Comment
Question by:JohnE
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
wtamviset earned 400 total points
ID: 1360270
To select words in RichEdit or DBRichEdit . You can use  SelStart and SelLength properties.
For Example :  
 DBRichEdit.SelStart := 10;
 DBRichEdit.SelLength := 5;
If you want to know what text that display in RichEdit window. You can you  Lines,Text properties.
Example to highlight  Hello word in DBRichEdit.
 I := Pos('Hello',DBRichEdit1.Text);
 If I > 0 then
Begin
    DBRichEdit1.SelStart := I;
    DBRichEdit1.SelLength := Length('Hello');
    DBRichEdit1.SelAttributes.Style := [fsBold];
End;

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question