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()

Android Notification with Full Screen

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

KiCad 시작하기 3 (새로운 소자 추가하기)

딩기 요트 명칭

tensorflow tf.expand_dims()

Android App architecture: State holders and UI state

Android Room database FTS

외동 휴게소(부산 방향) 추천 메뉴

KiCad 시작하기 2 (PCB 만들기)