当前位置:网站首页>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__
边栏推荐
- Rhcsa 06 - suid, sgid, sticky bit (to be added)
- Kivy教程之 更改背景颜色(教程含源码)
- 精品网址导航主题整站源码 wordpress模板 自适应手机端
- Apple CMS imitation watermelon video atmospheric response video template source code
- 【安全攻防】序列化与反序列,你了解多少?
- 浅谈一篇优质的小红书文案需要具备什么
- y55.第三章 Kubernetes从入门到精通 -- HPA控制器及metrics-server(二八)
- 【云原生】那些看起来很牛X,原理却很简单的一行代码
- 苹果CMS仿西瓜视频大气响应式视频模板源码
- Wechat official account infinite callback authorization system source code
猜你喜欢
Leetcode skimming: binary tree 07 (maximum depth of binary tree)
MySQL 索引和事务
Architecture practice camp - graduation project of module 9 of phase 6
Leetcode skimming: binary tree 04 (sequence traversal of binary tree)
Main applications of TDK lambda power supply
1. Mx6u-alpha development board (LED drive experiment in C language version)
Emlog用户注册插件 价值80元
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
96% of the collected traffic is prevented by bubble mart of cloud hosting
Redis: order collection Zset type data operation command
随机推荐
Main applications of TDK lambda power supply
(指针)编写函数void fun(int x,int *pp,int *n)
【愚公系列】2022年7月 Go教学课程 001-Go语言前提简介
Boutique website navigation theme whole station source code WordPress template adaptive mobile terminal
Pytest basic self-study series (I)
Rhcsa 03 - Basic permissions for documents
What is the difference between Western Digital Green disk, blue disk, black disk, red disk and purple disk
Keysight n9320b RF spectrum analyzer solves tire pressure monitoring scheme
Redis:有序集合zset类型数据操作命令
Leetcode skimming: binary tree 04 (sequence traversal of binary tree)
Exercises in quantum mechanics
精品网址导航主题整站源码 wordpress模板 自适应手机端
普源DS1000Z系列数字示波器在通信原理实验中的应用方案
博朗与Virgil Abloh于2021年为纪念博朗品牌100周年而联合打造的“功能性艺术”将在博物馆展出Abloh作品期间首次亮相
[Yugong series] go teaching course 002 go language environment installation in July 2022
2020 Bioinformatics | TransformerCPI
JS realizes the effect of text scrolling marquee
C language bidirectional linked list first edition
资深开发人员告诉你,怎样编写出优秀的代码?
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon