当前位置:网站首页>Formatted text of Kivy tutorial (tutorial includes source code)
Formatted text of Kivy tutorial (tutorial includes source code)
2022-07-04 04:35:00 【Knowledge fatness】
Formatting text
The most popular and widely used markup language is undoubtedly HTML. On the other hand ,Kivy Realized BBCode A variation of the , This is a markup language that has been used to format posts on many message boards . And HTML The obvious difference is BBCode Use square brackets as the label separator .
this Kivy The following labels are provided in :

In order to implement the required format ( Hours in bold , The rest of the text is fn_regular Fine font ), We can use the following code :
Label:
text: '[b]00[/b]:00:00'
markup: True
Combat code

from kivy.app import App
from kivy.lang import Builder
# File: clock.kv
KV = '''
BoxLayout:
orientation: 'vertical'
Label:
text: 'normal:11:00:00'
Label:
text: 'format:[b]00[/b]:00:00'
markup: True
'''
class ClockApp(App):
def build(self):
return Builder.load_string(KV)
if __name__ 边栏推荐
- RPC Technology
- Exercises in quantum mechanics
- RHCSA 01 - 创建分区与文件系统
- 什么是上下文?
- One click compilation and deployment of MySQL
- Asahi Kasei participated in the 5th China International Import Expo (5th ciie) for the first time
- I.MX6U-ALPHA开发板(模仿STM32驱动开发实验)
- Leetcode 121 best time to buy and sell stock (simple)
- B. All Distinct
- Many founders of technology companies provided enterpriser first with a round C financing of up to US $158million to help it invest in the next generation of global innovators
猜你喜欢

微信脑力比拼答题小程序_支持流量主带最新题库文件

Unity draws the trajectory of pinball and billiards

疫情远程办公经验分享| 社区征文

leetcode:1314. 矩阵区域和【二维前缀和模板】

Redis:哈希hash类型数据操作命令

Redis: order collection Zset type data operation command

戳气球和布尔运算问题(巨难)

Boutique website navigation theme whole station source code WordPress template adaptive mobile terminal

【云原生】那些看起来很牛X,原理却很简单的一行代码

NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
随机推荐
Redis: order collection Zset type data operation command
Experience sharing of epidemic telecommuting | community essay solicitation
What is the difference between Western Digital Green disk, blue disk, black disk, red disk and purple disk
[Yugong series] go teaching course 002 go language environment installation in July 2022
[Yugong series] go teaching course 001 in July 2022 - Introduction to go language premise
Keysight N9320B射频频谱分析仪解决轮胎压力监测方案
Wobo Union ended its strategic evaluation and decided to retain Bozi's business with excellent performance
A beautiful API document generation tool
Redis: hash type data operation command
Deep parsing structured exception handling (SEH) - by Matt Pietrek
领导:谁再用redis过期监听实现关闭订单,立马滚蛋!
B. All Distinct
Unity draws the trajectory of pinball and billiards
NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
Eig launched Grupo Cerro, a renewable energy platform in Chile
分布式CAP理论
【云原生】那些看起来很牛X,原理却很简单的一行代码
[cloud native] those lines of code that look awesome but have a very simple principle
【愚公系列】2022年7月 Go教学课程 001-Go语言前提简介
R语言中如何查看已安装的R包