Solved

Setting selattributes in richedit without repainting

Posted on 1997-05-22
10
779 Views
Last Modified: 2013-11-22
I'm writting a syntax high linghting code editor in delphi using the
richedit component, but every time I set the selattributes propertie, which occurs all the time, the component get redrawned (erased and repainted) causing a annoying flickering. Is there any way to avoidd this? I've tried to work with the VCL source code, but I cound't find any clue.
0
Comment
Question by:camelo
  • 6
  • 3
10 Comments
 
LVL 4

Expert Comment

by:StevenB
Comment Utility
 You CANNOT set the selected text in the delphi rich text component without it highlighting, flickering and generally doing unwanted things. The delphi TRichEdit is a wrapper object for a windows RichEdit control and it is not a very good one (look how many questions there are on this page regarding problems people are having with the TRichEdit) The solution to the problem is basically to use a different rich edit component. There are several available that are better than the TRichEdit. The better ones you'll have to pay for, but Free/Shareware products do exist.
  I'll only post this as a comment, so that if anyone knows of an answer they can post it, however I suspect that there is no solution using the TRichEdit. Here are some sites which you may like to investigate to get yourself a better component:

 http://members.aol.com/jziersch/index.html
 http://www.intermid.com/sherlock/compmall.htm
 http://SunSITE.icm.edu.pl/delphi/

  Good Luck,

  Steven
0
 
LVL 4

Expert Comment

by:StevenB
Comment Utility
 You CANNOT set the selected text in the delphi rich text component without it highlighting, flickering and generally doing unwanted things. The delphi TRichEdit is a wrapper object for a windows RichEdit control and it is not a very good one (look how many questions there are on this page regarding problems people are having with the TRichEdit) The solution to the problem is basically to use a different rich edit component. There are several available that are better than the TRichEdit. The better ones you'll have to pay for, but Free/Shareware products do exist.
  I'll only post this as a comment, so that if anyone knows of an answer they can post it, however I suspect that there is no solution using the TRichEdit. Here are some sites which you may like to investigate to get yourself a better component:

 http://members.aol.com/jziersch/index.html
 http://www.intermid.com/sherlock/compmall.htm
 http://SunSITE.icm.edu.pl/delphi/

  Good Luck,

  Steven
0
 
LVL 4

Expert Comment

by:StevenB
Comment Utility
oops.
0
 

Author Comment

by:camelo
Comment Utility
Thank you steven. I'll look for these better components...

Regarding the points assigned to this question, I'm not sure of how to proceed. When should I consider the question answered? Must I give away all these points even without haveing my problem solved?
0
 
LVL 4

Expert Comment

by:StevenB
Comment Utility
 The way I see it you have three options:

1) Leave the question here for a while longer to see if anyone can prove me wrong and provide an answer.

2) Mail Linda at customer support and ask her to remove the question, which she will do if she considers it justified.

3) If you consider my comment to be an answer then I'll add an answer that you can grade.

  Steven.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:camelo
Comment Utility
I'll take the first option and, after a while, I no body provide us with an answer, I'll grade you for that.

thank you

Camelo
0
 
LVL 1

Expert Comment

by:slp
Comment Utility
On a related topic, and something that I'd love to have Borland address directly is why can't (don't) they offer the Delphi code editor itself as a component?  I mean, it's written in Delphi, right? (anyway, that's what they keep telling us), and it's got pretty much all the bells and whistles anyone could want in a sophisticated text editor:

1) column blocking
2) syntax highlighting
3) support for >64k files
4) "virtual space" editing
5) key remapping (it obviously CAN do this, though no real interface to it is provided in D1 or D2)

With a reasonable TMemo style interface wrapping it, it would be great.  I'd be willing to pay a bit to get this, I'd even be interested in it without source code.

0
 
LVL 4

Expert Comment

by:StevenB
Comment Utility
 But is it RichText?
0
 
LVL 4

Accepted Solution

by:
StevenB earned 100 total points
Comment Utility
 It starts to seem like no-one can answer this. What progress or alternative solution have you come up with?

  Any chance of a grade, or are you going to get the question removed?

  Steven.
0
 

Author Comment

by:camelo
Comment Utility
 Cheers, Sorry the answer is so negative.

  Steven.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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 this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 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

10 Experts available now in Live!

Get 1:1 Help Now