Go Back   TX Text Control Community > TX Text Control Discussion and Support Forums > TX Text Control RapidSpell .NET

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.

Reply
 
Thread Tools Display Modes
  #1  
Old July 13, 2009
chris_balcer chris_balcer is offline
Registered User
 
Join Date: Apr 2007
Posts: 3
Spell Check against multiple TXTextControls

I was attempting to upgrade from 13.0 -> 15.0 using the integrated version of RapidSpell rather than the version purchased directly from Keyoti. I have been able to get things to compile, but I cannot seem to get the spell checker to work across multiple controls. Our forms can have up to 8-10 TXTextControl instances on each form, thus there needs to be a method to check all controls with a single menu-click. I tried the following with no luck:
Code:
 public override void SpellcheckAllControls()
        {
            // does not work -- AddTextComponent does not seem to work
            //rsdSpellCheckAllControls.AddTextComponent(rteTitle);
            //rsdSpellCheckAllControls.AddTextComponent(rteRatingChg);
            //rsdSpellCheckAllControls.AddTextComponent(rteComments);
            rsdSpellCheckAllControls.Check();

            // only checks last misspelled word in last instance of controls (rteComments)
            rsdSpellCheckAllControls.TextControl = rteTitle;
            rsdSpellCheckAllControls.Check();

            rsdSpellCheckAllControls.TextControl = rteRatingChg;
            rsdSpellCheckAllControls.Check();

            //rsdSpellCheckAllControls.AddTextComponent(rteComments);
            rsdSpellCheckAllControls.TextControl = rteComments;
            rsdSpellCheckAllControls.Check();



            // pre-upgrade spellchecker code (used to be easy)
            //rsdSpellCheckAllControls.ThirdPartyTextComponentToCheck = null;
            //rsdSpellCheckAllControls.ThirdPartyTextComponentsToCheck = new Keyoti.RapidSpell.ISpellCheckableTextComponent[] { new TextBoxBaseWrapper(wbtRNTitle), txaRatingChg, txaComments };
            //rsdSpellCheckAllControls.Check();
        }
Any help would be greatly appreciated because it seems by buying your version of the product we have gone backwards in our upgrade.
Thank you.
Chris

Last edited by Gunnar Giffey; July 28, 2009 at 15:41:01. Reason: Please use the BB CODE tag for code: http://forums.textcontrol.com/misc.php?do=bbcode#code
Reply With Quote
  #2  
Old July 15, 2009
Fabian Zenker's Avatar
Fabian Zenker Fabian Zenker is offline
TX Support Engineer
TX Text Control
 
Join Date: Jun 2008
Posts: 72
Re: Spell Check against multiple TXTextControls

Dear Chris,

I tried the first code and it works fine for me

Code:
//rsdSpellCheckAllControls.AddTextComponent(rteTitle );
//rsdSpellCheckAllControls.AddTextComponent(rteRatin gChg);
//rsdSpellCheckAllControls.AddTextComponent(rteComme nts);
rsdSpellCheckAllControls.Check();

this is definitely the recommended way to do it.

But, you tried this too

Code:
rsdSpellCheckAllControls.TextControl = rteTitle;
rsdSpellCheckAllControls.Check();

rsdSpellCheckAllControls.TextControl = rteRatingChg;
rsdSpellCheckAllControls.Check();
this will fail because RapidSpellDialog does not block on Check, so if you want to do this, you need to set

Code:
RapidSpellDialog.Modal=true
But I would suggest sticking with AddTextComponent. If it doesn't work could you send a sample project?

Regards,
Fabian
Reply With Quote
  #3  
Old July 15, 2009
chris_balcer chris_balcer is offline
Registered User
 
Join Date: Apr 2007
Posts: 3
Re: Spell Check against multiple TXTextControls

I attempted to use the code you suggested, see method below:

Code:
public override void SpellcheckAllControls()
       {
            rsdSpellCheckAllControls.AddTextComponent(rteTitle);
            rsdSpellCheckAllControls.AddTextComponent(rteRatingChg);
            rsdSpellCheckAllControls.AddTextComponent(rteComments);
            rsdSpellCheckAllControls.Check();
        }
And I get the following error:
Code:
System.Exception was unhandled by user code
  Message="Cannot call RapidSpellDialog.Check() without setting a text box to check. See TextBoxBaseToCheck or ThirdPartyTextComponentToCheck properties."
  Source="TXTextControl.RapidSpell.NET"
  StackTrace:
       at Keyoti.RapidSpell.TX.RapidSpellDialog.Check()
       at WilliamBlair.IM.FrontOffice.IMDashboard.UI.Outlook.ResearchNote.SpellcheckAllControls() in C:\WilliamBlair\IM\FrontOffice\IMDashboard\Outlook\IMDashboard.UI.Outlook\ResearchNote.cs:line 1450
       at WilliamBlair.IM.FrontOffice.IMDashboard.UI.Common.OLMainMenu.mnuSpelling_Click(Object sender, EventArgs e) in C:\WilliamBlair\IM\FrontOffice\IMDashboard\Outlook\IMDashboard.UI.Common\Controls\OLMainMenu.cs:line 683
       at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
       at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
       at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
       at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
       at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
       at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ToolStrip.WndProc(Message& m)
       at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  InnerException:
Any ideas what could be causing this? I have v15.0 SP1 for both the TxTextControl and TX RapidSpell. It seems that the properties the exception are referring to are from the Keyoti "direct" version of RapidSpell based on the way we had it previously implemented.

Any additional help would be extremely helpful. Thank you in advance for your reply.
Chris
Reply With Quote
  #4  
Old July 15, 2009
chris_balcer chris_balcer is offline
Registered User
 
Join Date: Apr 2007
Posts: 3
Re: Spell Check against multiple TXTextControls

Got the fix... I was not setting the TextControl at design time. Instead I was setting all of the controls to check during the call to the function. When I set the TextControl property = rteTitle at design time, then added the additional controls at runtime; the control works as planned. So... good to go, but not too intuitive.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem while using Keyoti Rapid Spell Check with Text Control 14 Deepakt TX Text Control .NET 1 September 25, 2008 14:09:29
Spell Check Unregistered TX Text Control ActiveX 0 June 7, 2003 17:41:16
The .net spell check sample Unregistered TX Text Control .NET 1 January 16, 2003 13:49:28
Spell Check in .net [TX .NET prerelease] Unregistered TX Text Control .NET 2 December 12, 2002 15:38:14


All times are GMT +1. The time now is 06:01:20.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© 1991 - 2010 The Imaging Source Europe GmbH