Is it possible to check misspelled word from Pascal source when TTextInputWidget_with_spellcheck is being used?
I would like to warn user if he will type misspelled word. Sure, Browser contain build in routine for underline word in red colour. But I want to do my own warning. Is it possible please? Or there is no object for that.
Mailing lists / pas2js / 2020-09
TTextInputWidget_with_spellcheck how to detect misspelled word
6 messages · 2 people ·
- MMgr. Janusz Chmiel 4
- MMichael Van Canneyt 2
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Mgr. Janusz Chmiel wrote 5 lines
As far as I know, there exists no API for this. The spellcheck attribute is just a hint for the browser. It is not an obligation to check it.
Michael.
OK. No problem. But. Do you think that it would be too complex to find or create some function or procedure, which would search The variable, if it contain some predefined three letters inside some word? for example
wha
you
etc.
Or it would not be very easy to implement such algorithm?
Routine should find predefined three letters which will be The first three letter of The word. Variable will always contain The only one word. For example
one editable field will fill The variable with word tenderness
and routine should find ten first letters in this variable and inside tenderness word.
Because I have realized, that I have not explained The desired routine well.
I Am analysing strutils.pas unit. There are functions such as Function StartsText(const ASubText, AText: string): Boolean; But I do not know, if this function will help Me.
Mgr. Janusz Chmiel wroteI Am analysing strutils.pas unit. There are functions such as Function StartsText(const ASubText, AText: string): Boolean; But I do not know, if this function will help Me.
Yes. It will tell you if AText starts with ASubText, case-insensitive. You can simply call this for every word you wish to check.
Michael.
