def EditCreator(parent): d = win32ui.CreateEdit() es = (win32con.WS_CHILD | win32con.WS_VISIBLE | win32con.WS_BORDER | win32con.ES_MULTILINE | win32con.ES_WANTRETURN) d.CreateWindow(es, (0, 0, 150, 150), parent, 1000) return d
def __init__(self, **kwds): font = kwds.setdefault('font', application_font) multiline = kwds.setdefault('multiline', False) password = kwds.pop('password', False) self._multiline = multiline self._password = password h = self._calc_height(font) flags = win_style if multiline: flags |= win_multiline_style if password: flags |= win_password_style win = ui.CreateEdit() # Border can get lost if we construct it with too big a rect, so # we set the initial size after creation. win.CreateWindow(flags, (0, 0, 0, 0), win_none, 0) win.ModifyStyleEx(0, win_ex_style) win.MoveWindow((0, 0, 100, h)) GTextField.__init__(self, _win=win, **kwds)