Possible Bug in MaskedTextCtrl

Hi again,

I now dug into the source.
Correct me if I'm wrong, but I think the "invalid coloring" is buggy.
Try the following:

Create a simple MaskedTextCtrl with autoformat USZIPPLUS4 (btw, any other
format will do the same)
Then set the first field to emptyInvalid=True with
control.SetFieldParameters(0,emptyInvalid=True)

Test the control.
It colors red when empty = ok
it colors red when the first 5 numbers are in = not ok
it colors white when all 9 numbers are in = ok

It should color white when the first field is valid, since then it's not empty
anymore and the actual value is valid.

What I figured in the code the parameter change routine sets the complete
control to emptyInvalid as soon as one field is set to emptyInvalid:

This snippet is in line 1709.

self._emptyInvalid = False
for field in self._fields.values():
    if field._emptyInvalid:
        self._emptyInvalid = True # if any field is .....

  UC

···

--
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417