0
menu.py 메뉴를 설정하는 방법
from kivy.app import App
from kivy.lang import Builder
kv_str = Builder.load_string('''
ActionBar:
pos_hint: {'top':1}
ActionView:
use_separator: True
ActionPrevious:
title: 'Example App'
with_previous: False
ActionButton:
text: 'File'
ActionButton:
text: 'Edit'
ActionGroup:
text: 'Tools'
mode: 'spinner'
ActionButton:
text: 'Tool1'
ActionButton:
text: 'Tool2'
ActionButton:
text: 'Tool3'
ActionButton:
text: 'Tool4'
''')
class ExampleApp(App):
def build(self):
return kv_str
if __name__ =='__main__':
ExampleApp().run()
대신 예를 들어 app.After의 왼쪽에 설정 오른쪽 side.How 오는 side.Now이 메뉴를 왼쪽 그 메뉴 아래에 작은 아이콘 추가 (두 번째 행)를 추가하십시오.
첫 번째 행 - (하위 메뉴) 파일 편집 도구
둘째 행 - icon1 icon2 icon3
Kivy 드롭 다운 목록을 사용하여 메뉴를 만들 수 있습니다. https://stackoverflow.com/questions/46312856/creating-a-main-menu-for-a-mobile-app-in-python에서 내 게시물을 참조하십시오. – ikolim
안녕하세요, 저를 도와 주셔서 감사합니다. – Yash