Solved

Formating text style in DBRichEdit

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now