本文整理汇总了Python中control.Control.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Control.__init__方法的具体用法?Python Control.__init__怎么用?Python Control.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类control.Control
的用法示例。
在下文中一共展示了Control.__init__方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from control import Control [as 别名]
# 或者: from control.Control import __init__ [as 别名]
def __init__(self, parent, **kwargs):
Control.__init__(self, Label(master=parent._frame), **kwargs)
# Tk does not have a truly dedicated "Image" object
# unless you install PIL
self._picture = Picture(self._ctrl)
if kwargs.get('file'):
self._picture.open_file(kwargs['file'])
示例2: __init__
# 需要导入模块: from control import Control [as 别名]
# 或者: from control.Control import __init__ [as 别名]
def __init__(self, parent, **kwargs):
Control.__init__(self, TkScale(parent._frame), **kwargs)
self.min = 0
self.max = 100
self.value = 0
self.ticks = 0
self.show_label = False
self.orientation = HORIZONTAL
示例3: __init__
# 需要导入模块: from control import Control [as 别名]
# 或者: from control.Control import __init__ [as 别名]
def __init__(self, null_control=False, **kwargs):
"""
null_control boolean:
"""
Control.__init__(self, **kwargs)
self.DOF = 2
self.null_control = null_control
示例4: __init__
# 需要导入模块: from control import Control [as 别名]
# 或者: from control.Control import __init__ [as 别名]
def __init__(self, **kwargs):
Control.__init__(self, **kwargs)
self.target = None
# generalized coordinates
self.target_gain = 2*np.pi
self.target_bias = -np.pi
示例5: __init__
# 需要导入模块: from control import Control [as 别名]
# 或者: from control.Control import __init__ [as 别名]
def __init__(self, parent, **kwargs):
Control.__init__(self, TkProgressBar(), **kwargs)
self._min = 0
self._max = 0
self._value = 0
self.max = 100
self.min = 0
self.value = 50
示例6: __init__
# 需要导入模块: from control import Control [as 别名]
# 或者: from control.Control import __init__ [as 别名]
def __init__(self, **kwargs):
Control.__init__(self)
if not Form._main_form:
Form._main_form = self
master = Tk()
else:
master = Toplevel()
master.withdraw()
self._ctrl = master
self._frame = Frame(master)
self._frame.pack(fill=BOTH, expand=1)
self._hidden_width = 0
self._hidden_height = 0
self.caption = kwargs.get('caption', 'Untitled')
self.width = kwargs.get('width', 640)
self.height = kwargs.get('height', 480)
self._icon = None
self._ctrl.protocol("WM_DELETE_WINDOW", self._on_close_handler)
Form._active_forms.append(self)
示例7: __init__
# 需要导入模块: from control import Control [as 别名]
# 或者: from control.Control import __init__ [as 别名]
def __init__(self, parent, **kwargs):
Control.__init__(self, TkTreeView(parent._frame), **kwargs)
self._columns = ListViewColumns(self)
self._items = ListViewItems(self)
示例8: __init__
# 需要导入模块: from control import Control [as 别名]
# 或者: from control.Control import __init__ [as 别名]
def __init__(self, parent, **kwargs):
Control.__init__(self, TkFrame(parent._frame), **kwargs)
self._frame = self._ctrl
self.border_width = 1
self.border_style = BORDER_SINGLE
示例9: __init__
# 需要导入模块: from control import Control [as 别名]
# 或者: from control.Control import __init__ [as 别名]
def __init__(self, parent, **kwargs):
Control.__init__(self, TkScrollbar(parent._frame), **kwargs)
示例10: __init__
# 需要导入模块: from control import Control [as 别名]
# 或者: from control.Control import __init__ [as 别名]
def __init__(self, parent, **kwargs):
Control.__init__(self, TkListBox(parent._frame), **kwargs)
self._items = ListItems(self)
示例11: __init__
# 需要导入模块: from control import Control [as 别名]
# 或者: from control.Control import __init__ [as 别名]
def __init__(self, parent, **kwargs):
Control.__init__(self, Text(master=parent._frame), **kwargs)
self._line_wrapper = _StringListWrapper(self._ctrl)
if kwargs.get('text'):
self._ctrl.insert(END, kwargs['text'])
示例12: __init__
# 需要导入模块: from control import Control [as 别名]
# 或者: from control.Control import __init__ [as 别名]
def __init__(self, parent, **kwargs):
Control.__init__(self, TkTreeView(parent._frame), **kwargs)
self._items = TreeViewItems(self)
self._ctrl['show'] = 'tree'
示例13: __init__
# 需要导入模块: from control import Control [as 别名]
# 或者: from control.Control import __init__ [as 别名]
def __init__(self, parent, **kwargs):
Control.__init__(self, TkComboBox(parent._frame), **kwargs)
self._items = ComboItems(self)
self._combotext = StringVar(self._ctrl)
self._control_set('exportselection', 0)
self._control_set('textvariable', self._combotext)
示例14: __init__
# 需要导入模块: from control import Control [as 别名]
# 或者: from control.Control import __init__ [as 别名]
def __init__(self, parent, **kwargs):
Control.__init__(self, Entry(master=parent._frame), **kwargs)
self._text = StringVar()
self._control_set('textvariable', self._text)