Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Search and replace. Please - RapidSpell WPF - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
TMulder
#1 Posted : Tuesday, January 4, 2011 10:10:01 PM
Rank: Member

Groups: Registered

Joined: 1/4/2011
Posts: 42
Any chance of getting a search and replace functionality in the spelling dialog? It should work across multiple textboxes.

Thanks
TMulder
#2 Posted : Friday, January 21, 2011 12:51:41 PM
Rank: Member

Groups: Registered

Joined: 1/4/2011
Posts: 42
Hey Jim, I heard from William that you guys are not considering to implement the Search and Replace. I guess we'll have to do that then :-). Anyway, in the spelling dialog, Keoyti must already have access to all attached (Rich)extboxes. Is there an easy way for us to get an hold to those attached textboxes in the dialog? If so then we can just add the search and replace buttons in the dialog and execute the search and replace on the attached textboxes.....
Jim
#3 Posted : Friday, January 21, 2011 1:32:40 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
I'll get you started on it with an example later today - should be fairly simple.

Jim

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

Evaluation Downloads - http://keyoti.com/products
-your feedback is helpful to other users, thank you!


Jim
#4 Posted : Friday, January 21, 2011 5:49:45 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
I'm sorry, I gave it a good shot but my (probably too clever for its own good) approach isn't working. It's too much of a square peg in a round hole (I'll send it to you if you like).

To answer your question - the dialog is very dumb, but you can modify it to pass in the RapidSpellDialog instance.

eg. from our custom GUI example, where we create the GUI

e.NewView = new CustomDialogViews.FinderDialogView(rapidSpellDialog1);

and modify the .ctor accordingly.

With that object you can get the text boxes (or actually wrappers) like this

Code:

ISpellCheckableTextComponent[] textBoxes = rapidSpellDialog.ThirdPartyTextComponentsToCheck;
//then iterate through them and their text
foreach(ISpellCheckableTextComponent textBox in textBoxes){
string text = textBox.Text;
//change a word
textBox.SelectionStart = 5;
textBox.SelectionEnd = 10;
textBox.SelectedText = "replace";
}

so you can see that even with RTB, we have a very simple interface you can use to find/replace.

Jim




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

Evaluation Downloads - http://keyoti.com/products
-your feedback is helpful to other users, thank you!


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.