Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / pas2js / 2020-09

TTextInputWidget_with_spellcheck how to detect misspelled word

6 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mgr. Janusz Chmiel

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.

Reply by email

Michael Van Canneyt
to Mgr. Janusz Chmiel
Mgr. Janusz Chmiel wrote 5 lines
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.

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.

Reply by email

Mgr. Janusz Chmiel
to Michael Van Canneyt

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?

Reply by email

Mgr. Janusz Chmiel
to Mgr. Janusz Chmiel

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.

Reply by email

Michael Van Canneyt
to Mgr. Janusz Chmiel
Mgr. Janusz Chmiel wrote
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.

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.

Reply by email