本文整理汇总了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)
示例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)