Solved

Setting selattributes in richedit without repainting

Posted on 1997-05-22
10
785 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
[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
  • 6
  • 3
10 Comments
 
LVL 4

Expert Comment

by:StevenB
ID: 1336530
 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
ID: 1336531
 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
ID: 1336532
oops.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:camelo
ID: 1336533
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
ID: 1336534
 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
 

Author Comment

by:camelo
ID: 1336535
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
ID: 1336536
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
ID: 1336537
 But is it RichText?
0
 
LVL 4

Accepted Solution

by:
StevenB earned 100 total points
ID: 1336538
 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
ID: 1336539
 Cheers, Sorry the answer is so negative.

  Steven.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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 an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

739 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