Results 1 to 10 of 27

Thread: Spellcheck function for DF20

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Castlegar, BC Canada

    Default Spellcheck function for DF20

    I hope that some of you may find this useful:

    As the Time came for me to start planning for deployment in DF20
    I made a list of ActiveX resources that I would need to replace
    in order to go to 64-bit. One of them was a replacement for
    Polar Spellchecker which was in all of my programs for about
    15 years. While Polar still seemed to be around, there was
    no support and it was doubtful that they were going to come out with
    a newer 64 bit version.

    After looking for another solution, I found very few options.
    Some were too costly. Most were not capable of underlining the
    misspelled word with a red squiggly line... and all of my users had
    grown to expect that feature. There seemed to be some hope in a
    product from WinterTree, but after getting the eval version, I seemed
    hopeless in figuring out how to get it to function as I wanted it...

    So I thought about a pure DF solution. I know that one had been created
    before, but it too didn't seem to function interactively as the user typed.
    After tinkering abit, I decided to attempt to create a subclass of the
    cRichEdit class which functioned much like a cTextEdit but allowed me to
    tuck in RTF codes to turn the red squiggly underline ON and OFF.

    April 20, 2020: MRC
    First beta release of this feature. It is written specifically for DF20 (in Alpha
    right now), and seems to do what I want. I then got adventurous and thought
    about making it backwards compatible, but found that DF20 seems to write a
    higher version of RTF. The difference is that the red squiggly prior to DF20 is
    a black squiggly. I tried all sorts of things and was marginally successful in marking
    misspelled text in red font with a red squiggly underline, but there were certain
    things that could derail this and then the content became a mess. So suffice it
    to say, that the GSCSpeller works best in DF20

    - Any pasting of RTF is intercepted and placed in the control as pure text
    - Get Value of will retrieve the RTF encoded string, but Get fText should be used
    to get the actual text.
    - I did not try to use this in a true RTF Control. I suspect that it would function
    correctly as far as finding misspelled words, but likely would mess up when attempting
    to add the RTF marking to mark the misspelled word. Ergo, my intention with this
    is simply to provide a class that appears like a plain text cTextEdit with spellchecking
    - ToDo: As I am writing this I feel that I forgot to create the ability to turn the
    Spellchecker function off

    - As always, much of this came from snippets of code that others had written for other
    purposes as well as from the Dataflex Users Forum.
    - Bob Worsley had made contributions to the right click mouse control that both he
    and I use on the Polar Spellchecker and I have scooped some of that here.
    - Peter Crook shared his code of his VDF Spellchecker back in 2011 and while I didn't use
    too much of it, I did scoop a few unique functions but reading through his code helped
    foster ideas towards my end goal.

    Of course, you are free to use this code as you see fit. It is provided without warrantee or
    guarantee of service and is without support, although I would be happy to hear your successes with
    it as well as any changes or improvements that you have made.

    You can download the GSCSpeller Workspace here

    Last edited by Mike Cooper; 24-Apr-2020 at 04:50 AM. Reason: Editted to update the download link

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts