0
Kivyフレームワークによって提供されるKV langでインターフェイスを作成しようとしています。私は2つのBoxLayoutウィジェットを積み重ねたいと思っています。最初のレイアウトがレンダリングされたときのデフォルトの高さは350です。それ以外の場合は縮小する必要があります。Kivyレイアウトが期待どおりレンダリングされない
は、以下の私のレイアウト
あなたが行うことができ<RootWidget>:
# this is the rule for your root widget, defining it's look and feel.
StackLayout:
height: 350.0
BoxLayout:
id: 'letterBox'
height: 150.0
ActionButton:
width: 15.0
text: '-'
ActionButton:
width: 15.0
text: 'A'
ActionButton:
width: 15.0
text: 'B'
ActionButton:
width: 15.0
text: 'C'
ActionButton:
width: 15.0
text: 'D'
ActionButton:
width: 15.0
text: 'E'
ActionButton:
width: 15.0
text: 'F'
ActionButton:
width: 15.0
text: 'G'
ActionButton:
width: 15.0
text: 'H'
ActionButton:
width: 15.0
text: 'I'
ActionButton:
width: 15.0
text: 'J'
ActionButton:
width: 15.0
text: 'K'
ActionButton:
width: 15.0
text: 'L'
ActionButton:
width: 15.0
text: 'M'
ActionButton:
width: 15.0
text: 'N'
ActionButton:
width: 15.0
text: 'O'
ActionButton:
width: 15.0
text: 'P'
ActionButton:
width: 15.0
text: 'Q'
ActionButton:
width: 15.0
text: 'R'
ActionButton:
width: 15.0
text: 'S'
ActionButton:
width: 15.0
text: 'T'
ActionButton:
width: 15.0
text: 'U'
ActionButton:
width: 15.0
text: 'V'
ActionButton:
width: 15.0
text: 'W'
ActionButton:
width: 15.0
text: 'X'
ActionButton:
width: 15.0
text: 'Y'
ActionButton:
width: 15.0
text: 'Z'
BoxLayout:
id: 'contentBox'
height: 150.0
ActionButton:
text: '4'
ワウのsize_hint属性が変更されました。私は相対的な大きさがどのように働いているのか疑問に思いました –