Solved

Setting selattributes in richedit without repainting

Posted on 1997-05-22
10
783 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
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
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.

 

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

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…
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…
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 …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 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