I have sub-classed dTextBox to provide a way to validate numbers.   In this 
case I'm trying to provide a visual clue to the user that number is invalid 
by setting the background color of the textbox to pink. 

With (self.IntegerWidth = 2 and self.DecimalWidth =2

 self.BackColor executes if I type ".999" in the following code.  But I only 
get a color change sometimes.  

        pattern='^([0-9]{0,%s})(\.[0-9]{0,%s})?$' % (self.IntegerWidth, 
self.DecimalWidth)
        if re.match(pattern, self.GetValue())is None:
            self.BackColor == "pink"
        else:
            self.BackColor == "white"

 
Is there some interaction between my class and dTextBox?  Or BackColor has 
some bug?
-- 
John Fabiani


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to