?
Solved

Formating text style in DBRichEdit

Posted on 1998-03-08
1
Medium Priority
?
629 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month10 days, 19 hours left to enroll

770 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