本文整理汇总了Python中pyjamas.ui.TextBox.TextBox.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python TextBox.__init__方法的具体用法?Python TextBox.__init__怎么用?Python TextBox.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.ui.TextBox.TextBox
的用法示例。
在下文中一共展示了TextBox.__init__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pyjamas.ui.TextBox import TextBox [as 别名]
# 或者: from pyjamas.ui.TextBox.TextBox import __init__ [as 别名]
def __init__(self, **kwargs):
TextBox.__init__(self)
self.max_length = kwargs.get('max_length', None)
self.min_length = kwargs.get('min_length', None)
self.required = kwargs.get('required', None)
if kwargs.get('initial'):
self.setValue(kwargs['initial'])
示例2: __init__
# 需要导入模块: from pyjamas.ui.TextBox import TextBox [as 别名]
# 或者: from pyjamas.ui.TextBox.TextBox import __init__ [as 别名]
def __init__(self, **kwargs):
if kwargs.get('input_type', 'text') == 'password':
if not kwargs.has_key('Element'):
kwargs['Element'] = DOM.createInputPassword()
#if not kwargs.has_key('StyleName'):
# kwargs['StyleName']="gwt-PasswordTextBox"
if not kwargs.has_key('StyleName'):
kwargs['StyleName']="textInput"
TextBox.__init__(self, **kwargs)
self.max_length = kwargs.get('max_length', None)
self.min_length = kwargs.get('min_length', None)
self.required = kwargs.get('required', None)
if kwargs.get('initial'):
self.setValue(kwargs['initial'])
示例3: __init__
# 需要导入模块: from pyjamas.ui.TextBox import TextBox [as 别名]
# 或者: from pyjamas.ui.TextBox.TextBox import __init__ [as 别名]
def __init__(self, **kwargs):
self.choicesPopup = PopupPanel(True, False)
self.choices = ListBox()
self.items = SimpleAutoCompletionItems()
self.popupAdded = False
self.visible = False
self.choices.addClickListener(self)
self.choices.addChangeListener(self)
self.choicesPopup.add(self.choices)
self.choicesPopup.addStyleName("AutoCompleteChoices")
self.choices.setStyleName("list")
if not kwargs.has_key('StyleName'): kwargs['StyleName']="gwt-AutoCompleteTextBox"
TextBox.__init__(self, **kwargs)
self.addKeyboardListener(self)
示例4: __init__
# 需要导入模块: from pyjamas.ui.TextBox import TextBox [as 别名]
# 或者: from pyjamas.ui.TextBox.TextBox import __init__ [as 别名]
def __init__(self, **ka):
ka['Element'] = ka.get('Element', None) or DOM.createInputPassword()
ka['StyleName'] = ka.get('StyleName', "gwt-PasswordTextBox")
TextBox.__init__(self, **ka)
示例5: __init__
# 需要导入模块: from pyjamas.ui.TextBox import TextBox [as 别名]
# 或者: from pyjamas.ui.TextBox.TextBox import __init__ [as 别名]
def __init__(self, **kwargs):
TextBox.__init__(self, **kwargs)
HighlightAll.__init__(self)