|
|||||||
| TX Text Control RapidSpell .NET Please use this forum for TX Text Control RapidSpell .NET support only. If you need support for a different product, please use the appropriate forum. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Multiple Simultaneous Forms
In my app, I can have multiple text controls open at one time spanning multiple forms. What is the recommended way to handle spell checking in this situation? Should each form create its own spell checking components? Or should there be one set of spelling components maintained elsewhere - using AddTextComponent/RemoveTextComponent to dynamically include/exclude the text controls.
Also, I was wondering if you could explain the inconsistencies in the AddTextComponent and RemoveTextComponent. For RapidSpellAsYouType, there is an instance of each function that takes a TextControl argument. But RapidSpellDialog only supports TextControl in its add function and not the remove. Why? How do you remove a TextControl? Thanks, Mike |
|
#2
|
||||
|
||||
|
Re: Multiple Simultaneous Forms
Hi Mike!
Using the AddTextComponent is the best way to spellcheck multiple TextControls with one TX Text Control RapidSpell object: Code:
Keyoti.RapidSpell.TX.RapidSpellAsYouType spellAsYouType = new Keyoti.RapidSpell.TX.RapidSpellAsYouType(); ... spellAsYouType.AddTextComponent(textControl1); spellAsYouType.AddTextComponent(textControl2); ... Regards, Fabian Last edited by Fabian Zenker; December 28, 2009 at 20:39:10. |
|
#3
|
|||
|
|||
|
Re: Multiple Simultaneous Forms
Hi Fabian. Thanks for the reply but it didn’t really answer my question. I am not asking how to spell check multiple text controls with a single rapid spell object. What I want to know is this: If I am opening and closing various forms with documents and sometimes have multiple open simultaneously, is it better to use a single rapid spell object or create one for each form? Thanks!
|
|
#4
|
||||
|
||||
|
Re: Multiple Simultaneous Forms
That really depends on your application design.
If you are running a single thread then for memory optimization purposes having a single control is better, however if you are threading the application or creating in an MDI style, then having one per form is better. This really has to be your decision. Good Luck Adam |
|
#5
|
|||
|
|||
|
Re: Multiple Simultaneous Forms
Adam - Thanks for the info.
Fabian - I am using version 15.1 and I don't see the fix you mentioned. I see the following two RemoveTextComponent functions in the spell dialog and neither seems to be compatible with TextControl objects. Am I doing something wrong? public virtual void RemoveTextComponent(ISpellCheckableTextComponent textComponent); // get run time error if cast to this interface public virtual void RemoveTextComponent(TextBoxBase textBoxBase); // get compile error if cast to this type Thanks, Mike |
|
#6
|
||||
|
||||
|
Re: Multiple Simultaneous Forms
Sorry, it seems as if a TextControl components overload was implemented for the RemoveTextComonent method of the RapidSpellAsYouType component, but not for the RapidSpellDialog.
I will contact our partner Keyoti to fix this issue with the next service pack. Fabian |
|
#7
|
||||
|
||||
|
Re: Multiple Simultaneous Forms
I can confirm that this will be fixed within the next service pack for TX Text Control RapidSpell .NET.
Workarounds: 1. Provided that there is only one dictionary language being used (ie not changing language during runtime), call this before RapidSpellDialog.Check is called; (rapidSpellDialog1.CheckerEngine as Keyoti.RapidSpell.RapidSpellChecker).ShareDictiona ry = true; and then use one instance of RapidSpellDialog for every TextControl. Calling the above prevents each instance using a new copy of the dictionary.
__________________
Björn Meyer, TX Text Control |
|
#8
|
||||
|
||||
|
Re: Multiple Simultaneous Forms
Hi!
We will release Service Pack on the Second of March 2010. Regards, Fabian |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Differences between Server and Windows Forms version | Adrian | TX Text Control .NET Server | 1 | June 19, 2006 09:05:22 |
| 'Soft Forms' | Peter McChesney | TX Text Control .NET | 0 | April 18, 2003 19:42:03 |