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
Solved

Formating text style in DBRichEdit

Posted on 1998-03-08
1
611 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
1 Comment
 

Accepted Solution

by:
wtamviset earned 100 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

808 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