From: Alex T. <al...@tw...> - 2005-02-28 14:59:58
|
Brian Debuire wrote: > Hi there, > > Thanks Alex the code works fine and it really is easier to read. > > But requesting more help how do I mix the text length and the numbers > only validation??? > def on_txtText_keyPress(self, event): if ( len(self.components.txtText.text) < 10 and event.keyCode in [45-58] ) or \ event.keyCode in [8,316,317,318,319,127,314,315]: event.Skip() Not quite so readable unfortunately. -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.5.1 - Release Date: 27/02/2005 |