当前位置:网站首页>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:边栏推荐
- MySQL foundation 06 DDL
- [system analyst's road] Chapter V double disk software engineering (development model development method)
- Correctly distinguish the similarities and differences among API, rest API, restful API and web service
- ROS2之ESP32简单速度消息测试(极限频率)
- 比较版本号
- Infrared thermography temperature detection system based on arm rk3568
- Mongodb common commands of mongodb series
- [introduction to AUTOSAR seven tool chain]
- 正确甄别API、REST API、RESTful API和Web Service之间的异同
- MySQL基础用法02
猜你喜欢

Matlab Doppler effect produces vibration signal and processing

强化学习 Q-learning 实例详解
![[flutter] icons component (load the built-in icon of flutter | display the material design icon completely)](/img/f5/3ec22f1480227f33a1c8ac457155ed.jpg)
[flutter] icons component (load the built-in icon of flutter | display the material design icon completely)

Find a benchmark comrade in arms | a million level real-time data platform, which can be used for free for life

How to convert Quanzhi a40i/t3 to can through SPI

Basic concept and implementation of overcoming hash

Reading and writing speed of Reza rz/g2l arm development board storage and network measurement

MySQL foundation 05 DML language

Basis of information entropy
![leetcode:701. Insertion in binary search tree [BST insertion]](/img/bc/1dda73198488eb81b49be2c1dff6c2.png)
leetcode:701. Insertion in binary search tree [BST insertion]
随机推荐
JS inheritance and prototype chain
Leetcode 6103 - minimum fraction to delete an edge from the tree
[shutter] image component (configure local GIF image resources | load placeholder with local resources)
Key wizard hit strange learning - automatic path finding back to hit strange points
leetcode:701. 二叉搜索树中的插入操作【bst的插入】
Meibeer company is called "Manhattan Project", and its product name is related to the atomic bomb, which has caused dissatisfaction among Japanese netizens
Canvas drawing -- bingdd
按鍵精靈打怪學習-多線程後臺坐標識別
leetcode:871. Minimum refueling times [Pat has done before + maximum stacking + greed]
18_ The wechat video number of wechat applet scrolls and automatically plays the video effect to achieve 2.0
机器学习术语
每日一题之干草堆的移动
ThinkPHP+Redis实现简单抽奖
按键精灵打怪学习-多线程后台坐标识别
Find a benchmark comrade in arms | a million level real-time data platform, which can be used for free for life
Matlab finds the position of a row or column in the matrix
Kivy教程大全之如何在 Kivy 中创建下拉列表
比较版本号
2022.2.14 resumption
详解RDD基本概念、RDD五大属性