当前位置: 首页>>代码示例>>Python>>正文


Python Control.__init__方法代码示例

本文整理汇总了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'])
开发者ID:todd-x86,项目名称:tkplus,代码行数:9,代码来源:image.py

示例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
开发者ID:todd-x86,项目名称:tkplus,代码行数:10,代码来源:slider.py

示例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
开发者ID:ptee,项目名称:blog,代码行数:11,代码来源:control_OSC.py

示例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
开发者ID:ptee,项目名称:blog,代码行数:11,代码来源:control_GC.py

示例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
开发者ID:todd-x86,项目名称:tkplus,代码行数:12,代码来源:progressbar.py

示例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)
开发者ID:todd-x86,项目名称:tkplus,代码行数:24,代码来源:form.py

示例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)
开发者ID:todd-x86,项目名称:tkplus,代码行数:6,代码来源:listview.py

示例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
开发者ID:todd-x86,项目名称:tkplus,代码行数:7,代码来源:panel.py

示例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)
开发者ID:todd-x86,项目名称:tkplus,代码行数:4,代码来源:scrollbar.py

示例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)
开发者ID:todd-x86,项目名称:tkplus,代码行数:5,代码来源:listbox.py

示例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'])
开发者ID:todd-x86,项目名称:tkplus,代码行数:7,代码来源:memo.py

示例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'
开发者ID:todd-x86,项目名称:tkplus,代码行数:6,代码来源:treeview.py

示例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)
开发者ID:todd-x86,项目名称:tkplus,代码行数:8,代码来源:combobox.py

示例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)
开发者ID:todd-x86,项目名称:tkplus,代码行数:6,代码来源:edit.py


注:本文中的control.Control.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。