Solved

Setting selattributes in richedit without repainting

Posted on 1997-05-22
10
782 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
ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

 

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PDF library for Delphi 2 121
Virtuailstring tree compare node issue 14 116
Delphi: ForceDirectory plain function 7 31
how to change, disabled button color FMX ? 1 32
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

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