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


Python OwnButton.height方法代码示例

本文整理汇总了Python中ownComponents.ownButton.OwnButton.height方法的典型用法代码示例。如果您正苦于以下问题:Python OwnButton.height方法的具体用法?Python OwnButton.height怎么用?Python OwnButton.height使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ownComponents.ownButton.OwnButton的用法示例。


在下文中一共展示了OwnButton.height方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: update

# 需要导入模块: from ownComponents.ownButton import OwnButton [as 别名]
# 或者: from ownComponents.ownButton.OwnButton import height [as 别名]
 def update(self):
     self.materialLayout.remove_widget(self.btnMaterialEditor)
     btn_material_A = OwnButton(text=self.allMaterials.allMaterials[-1].name)
     btn_material_A.height = self.h
     btn_material_A.bind(on_press=self.show_material_information)
     self.materialLayout.add_widget(btn_material_A)
     self.materialLayout.add_widget(self.btnMaterialEditor)
开发者ID:simbtrix,项目名称:screenmix,代码行数:9,代码来源:editor.py

示例2: create_gui

# 需要导入模块: from ownComponents.ownButton import OwnButton [as 别名]
# 或者: from ownComponents.ownButton.OwnButton import height [as 别名]
 def create_gui(self):
     self.create_material_information()
     self.materialLayout = GridLayout(cols=1, spacing=Design.spacing, size_hint_y=None)
     self.materialLayout.padding = Design.padding
     # Make sure the height is such that there is something to scroll.
     self.materialLayout.bind(minimum_height=self.materialLayout.setter('height'))
     for i in self.allMaterials.allMaterials:
         btn = OwnButton(text=i.name)
         btn.height = self.h
         btn.bind(on_press=self.show_material_information)
         self.materialLayout.add_widget(btn)
     self.btnMaterialEditor = OwnButton(text=self.createStr)
     self.btnMaterialEditor.height = self.h
     self.btnMaterialEditor.bind(on_press=self.create_material)
     self.materialLayout.add_widget(self.btnMaterialEditor)
     scrollView = ScrollView()
     scrollView.add_widget(self.materialLayout)
     self.add_widget(scrollView)
开发者ID:simbtrix,项目名称:screenmix,代码行数:20,代码来源:editor.py


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