]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/MaskedNumCtrl.py
Changed name to wxFIXED_MINSIZE since that is more descriptive of what
[wxWidgets.git] / wxPython / demo / MaskedNumCtrl.py
index 855726b1006bc0bdf939f9bbfca611cc6eb8744a..e0e4077600da4d75c42b252dea3e91089739f22f 100644 (file)
@@ -1,25 +1,10 @@
-# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
-#
-# o Updated for wx namespace
-# 
-# 11/29/2003 - Jeff Grimmett (grimmtooth@softhome.net)
-#
-# o wx.lib.maskednumctrl needs hit up with the renamer and new binders
-# 
-# 12/09/2003 - Jeff Grimmett (grimmtooth@softhome.net)
-#
-# o Issues with lib corrected.
-# 
-# 12/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
-#
-# o wxMaskedNumCtrl -> MaskedNumCtrl
-# 
 
 import  string
 import  sys
 import  traceback
 
 import  wx
 
 import  string
 import  sys
 import  traceback
 
 import  wx
+import  wx.lib.maskededit       as me
 import  wx.lib.maskednumctrl    as mnum
 #----------------------------------------------------------------------
 
 import  wx.lib.maskednumctrl    as mnum
 #----------------------------------------------------------------------
 
@@ -47,13 +32,13 @@ The controls at the top reconfigure the resulting control at the bottom.
                                 )
 
         groupcharlabel = wx.StaticText( panel,-1, "Grouping char:" )
                                 )
 
         groupcharlabel = wx.StaticText( panel,-1, "Grouping char:" )
-        self.groupchar = mnum.MaskedTextCtrl( 
+        self.groupchar = me.MaskedTextCtrl( 
                                 panel, -1, value=',', mask='&', excludeChars = '-()',
                                 formatcodes='F', emptyInvalid=True, validRequired=True
                                 )
 
         decimalcharlabel = wx.StaticText( panel,-1, "Decimal char:" )
                                 panel, -1, value=',', mask='&', excludeChars = '-()',
                                 formatcodes='F', emptyInvalid=True, validRequired=True
                                 )
 
         decimalcharlabel = wx.StaticText( panel,-1, "Decimal char:" )
-        self.decimalchar = mnum.MaskedTextCtrl( 
+        self.decimalchar = me.MaskedTextCtrl( 
                                 panel, -1, value='.', mask='&', excludeChars = '-()',
                                 formatcodes='F', emptyInvalid=True, validRequired=True
                                 )
                                 panel, -1, value='.', mask='&', excludeChars = '-()',
                                 formatcodes='F', emptyInvalid=True, validRequired=True
                                 )
@@ -94,16 +79,16 @@ value entry ctrl:""")
 
         grid1 = wx.FlexGridSizer( 0, 4, 0, 0 )
         grid1.Add( intlabel, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
 
         grid1 = wx.FlexGridSizer( 0, 4, 0, 0 )
         grid1.Add( intlabel, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
-        grid1.Add( self.integerwidth, 0, wx.ALIGN_LEFT|wx.ALL, 5 )
+        grid1.Add( self.integerwidth, 0, wx.FIXED_MINSIZE|wx.ALIGN_LEFT|wx.ALL, 5 )
 
         grid1.Add( groupcharlabel, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
 
         grid1.Add( groupcharlabel, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
-        grid1.Add( self.groupchar, 0, wx.ALIGN_LEFT|wx.ALL, 5 )
+        grid1.Add( self.groupchar, 0, wx.FIXED_MINSIZE|wx.ALIGN_LEFT|wx.ALL, 5 )
 
         grid1.Add( fraclabel, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
 
         grid1.Add( fraclabel, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
-        grid1.Add( self.fractionwidth, 0, wx.ALIGN_LEFT|wx.ALL, 5 )
+        grid1.Add( self.fractionwidth, 0, wx.FIXED_MINSIZE|wx.ALIGN_LEFT|wx.ALL, 5 )
 
         grid1.Add( decimalcharlabel, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
 
         grid1.Add( decimalcharlabel, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
-        grid1.Add( self.decimalchar, 0, wx.ALIGN_LEFT|wx.ALL, 5 )
+        grid1.Add( self.decimalchar, 0, wx.FIXED_MINSIZE|wx.ALIGN_LEFT|wx.ALL, 5 )
 
         grid1.Add( self.set_min, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
         grid1.Add( self.min, 0, wx.ALIGN_LEFT|wx.ALL, 5 )
 
         grid1.Add( self.set_min, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
         grid1.Add( self.min, 0, wx.ALIGN_LEFT|wx.ALL, 5 )
@@ -343,4 +328,4 @@ overview = mnum.__doc__
 if __name__ == '__main__':
     import sys,os
     import run
 if __name__ == '__main__':
     import sys,os
     import run
-    run.main(['', os.path.basename(sys.argv[0])])
+    run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])