Best way to disallow a comma to be entered into a text box?

Shameless plug warning:
I wrote a csv file editor and submitted it for the Xojo Just Code challenge in 2018.
A link to the project is here:
http://electronbunker.ca/XojoProjects/Week5_CSV_Editor.zip
It reads and writes csv files, and correctly escapes and un-escapes all of the problem characters. The routines that you would be interested in are:
ImportCSV - reads from a text input stream and correctly parses the fields including fields with embedded commas, line endings and quotes
OutputCSV - Saves data to a text output stream. It calls OutQuote to handle the messy job of delimiting and escaping any problem characters.
OutQuote - The part that deals with the problem characters when saving to file.

Edited to add:
Saving to a file is much simpler than reading from a file and parsing the input.
For saving to a file, the routine for dealing with escaping and quoting, OutQuote, is only 6 lines. For reading and parsing the input file, it’s considerably more complicated. However, I’ve never found any other csv input parsing code as short as what I’ve created. It uses a quote parity technique which simplifies the code.

3 Likes