本文整理匯總了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)