本文整理汇总了Python中pyjamas.ui.TextArea.TextArea.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python TextArea.__init__方法的具体用法?Python TextArea.__init__怎么用?Python TextArea.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.ui.TextArea.TextArea
的用法示例。
在下文中一共展示了TextArea.__init__方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pyjamas.ui.TextArea import TextArea [as 别名]
# 或者: from pyjamas.ui.TextArea.TextArea import __init__ [as 别名]
def __init__(self, panel, text ='', left=0, top=0, width=0 , height=0,
color = None, background = None, click = None, focus = None):
TextArea.__init__(self)#, text=text)
self.panel = panel
attrs = dict (position = 'absolute', left=dpx(left), top=dpx(top) ,
width=dpx(width) , height=dpx(height),
color = color, background = background)
for key in attrs:
if not attrs[key]: del(attrs[key])
#self.setName(source)
self.setText(text)
self.setStyleAttribute(attrs)
#self.setStyleAttribute({'position':'absolute',
# 'top':'175px','left':'158px'
# ,'color':COLOR['maroon']
# ,'background':COLOR['peachpuff']
# ,'background-color':COLOR['peachpuff']})
#self.setSize(width,height)
#self.setReadonly('readonly')
if click :
self.addClickListener(click)
if focus :
self.addFocusListener(focus)
self.panel.add(self)
示例2: __init__
# 需要导入模块: from pyjamas.ui.TextArea import TextArea [as 别名]
# 或者: from pyjamas.ui.TextArea.TextArea import __init__ [as 别名]
def __init__(self, worksheet, cell_id, **kwargs):
TextArea.__init__(self, **kwargs)
self._worksheet = worksheet
self._cell_id = cell_id
self.addKeyboardListener(self)
#self.addClickListener(self)
self.addFocusListener(self)
self.set_rows(1)
self.setCharacterWidth(80)
示例3: __init__
# 需要导入模块: from pyjamas.ui.TextArea import TextArea [as 别名]
# 或者: from pyjamas.ui.TextArea.TextArea import __init__ [as 别名]
def __init__(self, doneHandler):
TextArea.__init__(self)
self.doneHandler = doneHandler #this handler will be called when user press ctrl-enter
示例4: __init__
# 需要导入模块: from pyjamas.ui.TextArea import TextArea [as 别名]
# 或者: from pyjamas.ui.TextArea.TextArea import __init__ [as 别名]
def __init__(self, **kwargs):
TextArea.__init__(self, **kwargs)
HighlightAll.__init__(self)