Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Different language per control - RapidSpell WPF - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
AndrewJackson
#1 Posted : Thursday, June 28, 2012 11:21:47 PM
Rank: Member

Groups: Registered

Joined: 1/27/2011
Posts: 4
I need to be able to spell check in a language specified in a "Language" property on the textbox control itself.

Some plausible approaches I've thought about:

1. I could have a RapidSpellAsYouType/RapidSpellDialog component per language and register the text controls against the appropriate one for the language. This would be ok for inline spell checking but would confuse the users when using the RapidSpellDialog as it would only check controls of a single language at a time rather than all on the form in order.

2. I could trap an event fired when a text control is about to be checked and swap the language/dictionary. Any idea where these hook points would be?

How would you recommend I set this up? Thanks for your help.

- Andrew Jackson
Jim
#2 Posted : Friday, June 29, 2012 4:13:06 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Hi Andrew, I don't think #2 is going to be possible.

#1 could work, and you can actually switch the dictionary for each textboxusing the SpellCheckStartedTextBox event, eg.

Code:

rapidSpellDialog1.SpellCheckStartedTextBox += new TextBoxSpellCheckEventHandler(rapidSpellDialog1_SpellCheckStartedTextBox);
        }

        void rapidSpellDialog1_SpellCheckStartedTextBox(object sender, TextBoxSpellCheckEventArgs e)
        {
            if (e.TextBoxIndex == 1)
                rapidSpellDialog1.CheckerEngine.DictFilePath = @"..\path\toDICT-DE-DE-German.dict";
        }



that code worked for me, I just wanted it to use German for the 2nd textbox.

You'll probably want to use this to get the actual textbox
Code:

rapidSpellDialog1.TextBoxBasesToCheck[e.TextBoxIndex]


I tried the above with v3, btw.

Best
Jim

-your feedback is helpful to other users, thank you!

Evaluation Downloads
-your feedback is helpful to other users, thank you!


AndrewJackson
#3 Posted : Monday, July 2, 2012 1:49:55 AM
Rank: Member

Groups: Registered

Joined: 1/27/2011
Posts: 4
That's working nicely - thanks!
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.