當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。