当前位置:网站首页>Kivy tutorial how to create drop-down lists in Kivy
Kivy tutorial how to create drop-down lists in Kivy
2022-07-03 01:18:00 【Knowledge fatness】
Below I provide a usage ScreenManager stay Kivy An example of creating a drop-down list in . Please note that , This applies to all layouts , But I found that GridLayout Is the easiest to control . You can copy and paste it into your code .

from kivy.app import App
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.lang import Builder
Builder.load_file("try_out_app.kv")
class ExampleScreen(Screen):
pass
class RootWidget(ScreenManager):
pass
class Demo(App):
def build(self):
return RootWidget()
if __name__ == "__main__":
Demo().run()
Interface
<ExampleScreen>:
name: "example_screen"
GridLayout:
cols: 1
padding: 100, 20
size_hint: 0.5, 0.5
Button:
id: btn
text: "select"
size_hint: None, None
on_parent: drop_content.dismiss()
on_release: drop_content.open(self)
DropDown:边栏推荐
- R language ggplot2 visualization: use ggplot2 to display dataframe data that are all classified variables in the form of thermal diagram, and customize the legend color legend of factor
- Basic use of sringcloud & use of component Nacos
- [shutter] image component (configure local GIF image resources | load placeholder with local resources)
- [system analyst's road] Chapter V double disk software engineering (development model development method)
- [shutter] image component (cached_network_image network image caching plug-in)
- Machine learning terminology
- [shutter] animation animation (shutter animation type | the core class of shutter animation)
- MySQL basics 03 introduction to MySQL types
- [Arduino experiment 17 L298N motor drive module]
- excel去除小数点后面的数据,将数字取整
猜你喜欢
随机推荐
dotConnect for PostgreSQL数据提供程序
关于Fibonacci数列
【我的OpenGL学习进阶之旅】关于欧拉角、旋转顺序、旋转矩阵、四元数等知识的整理
比较版本号
删除有序链表中重复的元素-II
【系统分析师之路】第五章 复盘软件工程(开发模型开发方法)
ROS2之ESP32简单速度消息测试(极限频率)
拥抱平台化交付的安全理念
每日一题之干草堆的移动
[system analyst's road] Chapter V double disk software engineering (development model development method)
链表中的节点每k个一组翻转
Androd Gradle 对其使用模块依赖的替换
Database SQL language 01 where condition
1696C. Fishingprince plays with array [thinking questions + intermediate state + optimized storage]
Basis of information entropy
Matlab Doppler effect produces vibration signal and processing
软考信息系统项目管理师_历年真题_2019下半年错题集_上午综合知识题---软考高级之信息系统项目管理师053
链表内指定区间反转
Embrace the safety concept of platform delivery
[自我管理]时间、精力与习惯管理







![[AUTOSAR VI description document]](/img/3d/1382acbc4054ab218485a12b7b4e6b.png)

