|
Rank: Member
Groups: Registered
Joined: 3/12/2014 Posts: 3
|
Hi Jim
I am using rapidspell desktop 5.1.1 (installed from file RapidSpellDesktop-NET-5.1.1-UD-Setup.msi) with txtextcontrol20. I can only find the 3rd party dll for 5.1.0?? (file version 5.1.13.82)
The problem I am facing is that the option IgnoreIncorrectSentenceCapitalisation is not showing in the component.
I am trying to set up so that the first letter of a sentence is auto capitalised.
Is there something I am doing wrong (I hope so!)
Thanks
Andy
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Hi Andy, sorry you aren't doing anything wrong. With TX we have limited context, we're just asked to spell check a word, so we don't know where in the sentence that word is, hence, can't judge it's capitalisation. Best Jim -your feedback is helpful to other users, thank you!-your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 3/12/2014 Posts: 3
|
Thanks Jim. Have you come across any neat solutions to capitalising the first character of a sentence in TxTextControl ?
I'd rather not re-invent the wheel!
Thanks for the fast reply :)
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
I haven't sorry. In theory you could grab the body text and spell check it using the RapidSpellChecker.Check(body) method - then iterate NextBadWord to find capitalization errors. But even then you have to map from the string you passed to Check back to the character indices in the actual document, to make the change. -your feedback is helpful to other users, thank you!-your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 3/12/2014 Posts: 3
|
Thanks Jim
Got it sorted. On the keypress I look at the preceding 2 characters in the text. if they are ". " then I uppercase the key, does all I need.
Thanks for a great component :)
Andy
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
That's neat - just remember to account for things like "e.g." where you don't want upper case next. Oh and don't forget ! ? as sentence enders either. -your feedback is helpful to other users, thank you!-your feedback is helpful to other users, thank you!
|
|