Mar*_*tin 0 python-2.7 kivy-language
我是kivy框架的新手.请任何人可以帮助如何创建菜单,如文件,编辑,工具和子菜单在kivy.
提前致谢
如何使用ActionBar
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()
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2483 次 |
| 最近记录: |