Addict Discuss
LiveSpellCheck and TcxDBRichEdit
Thread Starter: plumothy Started: 4/21/2008 2:53 PM UTC
Replies: 12
LiveSpellCheck and TcxDBRichEdit
I have a form with 10 TcxDBRichEdit controls on it.
THese controls are all identical apart from the being bound to different tables/fields and some of them have their text colour specified.

My TAddictAutoLiveSpell component is on another form.

When the form is created I call AddControl for all 10 controls.

For 8 of the RichEdits everything is fine. For 2 of them, I get the red squigglies for unrecognised words but right click does not produce the spelling menu (it does in the other 8) and auto-correct does not work (it does in the other 8).

I have changed nearly every property in the 2 offending RichEdits to try and cure this but nothing helps. I can't think what else to try. Can anyone think what might cause this?

RE: LiveSpellCheck and TcxDBRichEdit
Can't recall anyone reporting something like this.

It may be worth trying toggling DoubleBuffered and see if this fixes it.

If not, and in case the problem is related to different font sizes, try setting the runtime property IrregularLineHeights to true.

Let me know if the problem persists and I'll see if the Author has any thoughts...


Glenn Crouch, mailto:glenn@esbconsult.com
ESB Consultancy, http://www.esbconsult.com
Home of ESBPCS, ESB Calculators, ESBStats and ESBPDF Analysis
Kalgoorlie-Boulder, Western Australia
Re: RE: LiveSpellCheck and TcxDBRichEdit
Thanks for the suggestions but, unfortunately, none of them has made any difference. (I also tried setting AggressiveContextMenu - no effect.)

Looking at the Addict help, those properties mostly relate to drawing the red squigglies. But they are OK. My problem is lack of Auto-Correct and the wrong context menu.

I copied one of the RichEdits that works OK to another place on my form and the copy doesn't work either. That proves to me that it is not anything I have done with their properties. It's bizarre.

One of the 2 RichEdits that misbehaves is the one I most need to work in my application. I have tried changing the order in which I call AddControl for each RichEdit but it always the same 2 that refuse to work. I have even commented out all the calls to AddControl except for one - and it still does not work correctly.

I chose Addict because it supports DevExpress RichEdits. I hope I don't have to change to another one because, up until now, it has been fine.

My RichEdit is part of ExpressQuantumGrid Suite v6.33. Delphi is v2006 (10.0.02288.42451 Update 2).
Win XP Home SP2, Build 2600.

RE: RE: LiveSpellCheck and TcxDBRichEdit
I'll check to see if the Author has any further suggestions...


Glenn Crouch, mailto:glenn@esbconsult.com
ESB Consultancy, http://www.esbconsult.com
Home of ESBPCS, ESB Calculators, ESBStats and ESBPDF Analysis
Kalgoorlie-Boulder, Western Australia
Re: RE: RE: LiveSpellCheck and TcxDBRichEdit
It's been quite a few days now - any more from "the Author"?

RE: RE: RE: LiveSpellCheck and TcxDBRichEdit

My apologies – no I haven’t and I should have chased it up again earlier – have just done so...

 

Glenn Crouch, Addict Support
mailto:support@addictivesoftware.com
Addictive Software http://www.addictivesoftware.com  

 

From: plumothy [mailto:plumothy]
Sent: Thursday, 1 May 2008 4:36 pm
To: Addict Discuss mailing list
Subject: Re: RE: RE: [Addict] LiveSpellCheck and TcxDBRichEdit

 

It's been quite a few days now - any more from "the Author"?

Re: LiveSpellCheck and TcxDBRichEdit

Although this isn't the answer you need, I'd suggest copying the rich edit controls to another form (by themselves) and checking if they work there.

Then, depending on those results, take some of the existing rich edits off the form and see if that helps

Lastly, the 2 offending controls... could they be inside a special panel or page control? sometimes these controls prevent messages from being passed through correctly which may be stopping things working. Try placing them directly on the form  and see if this makes any difference (same control, no parent panels etc)

Most likely your issue will be that you've used up too many resources (10 on 1 page is a large amount) or the windows messages arent getting through to the controls.

RE: LiveSpellCheck and TcxDBRichEdit
The Addict Author apologies for his delay in responding to this problem. His comments as follows (which do fit in with the good reply from Andrew):

Is there anything that differentiates the two that don't work from those that do?

I would normally have guessed that something came along and subclassed  the control after Addict did and is thus depriving Addict of the messages  it needs to do mouse and keyboard operations.

Could you try calling AddControl on a button press rather than in  OnCreate?  If that works it would be indicative that another component is subclassing the controls and interfering.
Re: LiveSpellCheck and TcxDBRichEdit
Yes, they are nested deep inside panels on panels on a page control. They need to be where they are and cannot be placed directly on the form. The only thing that differentiates these 2 controls from others that work correctly is their location on the form.

I have removed the two controls and replaced them with standard TRichEdits - they now work OK. However, I would like to go back to the cxRichEdits if we can get this resolved.

Lastly, the 2 offending controls... could they be inside a special panel or page control? sometimes these controls prevent messages from being passed through correctly which may be stopping things working. Try placing them directly on the form  and see if this makes any difference (same control, no parent panels etc)



Re: RE: LiveSpellCheck and TcxDBRichEdit
Could you try calling AddControl on a button press rather than in  OnCreate?  If that works it would be indicative that another component is subclassing the controls and interfering.

OK, I will try this and let you know what happens.
RE: LiveSpellCheck and TcxDBRichEdit
> I have removed the two controls and replaced them with standard TRichEdits - they now work OK. However, I would like to go back to the cxRichEdits if we can get this resolved. <<

Well this tends to indict that the problem is something the cxRichEdit is doing rather than a problem at our end - but see how you go with things that you are going to try in your other response :)


Glenn Crouch, Addict Support
mailto:support@addictivesoftware.com
Addictive Software http://www.addictivesoftware.com
Re: LiveSpellCheck and TcxDBRichEdit
plumothy wrote:

For 8 of the RichEdits everything is fine. For 2 of them, I get the
red squigglies for unrecognised words but right click does *not
*produce the spelling menu (it does in the other 8) and auto-correct
does *not *work (it does in the other 8).

I had a simillar problem with TcxDBRichEdit controls, red squiggle but
right-click gave me the standard popup menu.

To fix it I had to set TcxDBRichEdit.Properties.HideSelection := false
for each control and then it worked.

Regards,
Cary.
RE: LiveSpellCheck and TcxDBRichEdit
To fix it I had to set TcxDBRichEdit.Properties.HideSelection := false
for each control and then it worked.

Thanks for letting us know, Cary :)


Glenn Crouch, Addict Support
mailto:support@addictivesoftware.com
Addictive Software http://www.addictivesoftware.com    





--
Glenn Crouch mailto:support@addictivesoftware.com
Addictive Software Support
http://www.addictivesoftware.com