Python from kivy.uix.boxlayout import BoxLayout

사용 버전: Python 3.6.8, Kivy 1.11.1
사용 프로그램: Atom 1.42.0 x64

파이썬 from kivy.uix.boxlayout import BoxLayout에 대해서 알아보겠습니다.


BoxLayout은 화면을 나눠주는 역할을 합니다.











BoxLayout에 들어가는 속성을 알아보겠습니다.

- orientation
'vertical'과 'horizontal'이 들어갑니다. 박스 구획이 세로로 나뉠지 가로로 나뉠지를 선택합니다.

- spacing
하나의 숫자가 들어가며, 각 박스끼리의 간격을 정합니다.

- padding
[padding_left, padding_top, padding_right, padding_bottom] 또는 [padding_horizontal, padding_vertical]이 들어가며, 전체 박스와 각 박스끼리의 간격을 정합니다.

- size_hint
(x, y) 형태로 들어가며, 현재 Layout의 x 축과 y 축의 비율을 정할 수 있습니다. 1은 밖의 Layout의 100% 크기입니다.

끝.



카테고리: Kivy

댓글

이 블로그의 인기 게시물

Python urllib.parse.quote()

KiCad 시작하기 4 (기존 회로도 수정 및 추가)

Android Compose Coil library

KiCad 시작하기 1 (회로도 만들기)

Android Notification with Full Screen

iOS Swift callAsFunction

Android Custom IME(Input method editor) 만들기

iOS Error Undefined symbol Testing.Trait

Android Compose automation for getting localized images to use on Play Store app image

tensorflow tf.expand_dims()