Вторая страница автоматически в поноэкранном размере

Добавлена возможность подстроения изобнражения, пока не реализовано
This commit is contained in:
danamir
2018-04-15 18:02:55 +03:00
parent a1411f542f
commit 9fc7359dd1
3 changed files with 40 additions and 14 deletions

32
validators.py Normal file
View File

@@ -0,0 +1,32 @@
import wx
import string
class DataValidator(wx.PyValidator):
def __init__(self):
wx.PyValidator.__init__(self)
self.flag = flag
self.Bind(wx.EVT_CHAR, self.OnChar)
def clone(self):
return DataValidator()
def validate(self):
return True
def TransferToWindow(self):
return True
def TransferFromWindow(self):
return True
def OnChar(self, event):
keycode = int(event.GetKeyCode())
if keycode < 256:
#print keycode
key = chr(keycode)
#print key
if self.flag == 'no-alpha' and key in string.ascii_letters:
return
if self.flag == 'no-digit' and key in string.digits:
return
event.Skip()