avatar

松果工作室

欢迎光临

  • 首页
  • ESP
  • LVGL
  • freeRTOS
  • 快速笔记
  • 考察日志
  • 个人收藏
  • 我的服务
Home (ESP-IDF)LVGL XML 绑定
文章

(ESP-IDF)LVGL XML 绑定

Posted recently Updated recently
By YCP
1~2 min read

实现控件数值与显示数值的绑定

截屏2026-02-08 14.26.15.png

1、建立一个Component

<component>
	<api>
		<prop name="subject" type="subject" default="volume" />
	</api>

	<view width="100%" height="30%" flex_flow="column" style_flex_main_place="center" style_flex_cross_place="center">
		<lv_slider bind_value="$subject" />
		<lv_label bind_text="$subject" />
	</view>
</component>

2、globals 中添加 subject

    <int name="volume" value="50" />

3、view 中进行应用

    <slider_bind subject="volume" />

LVGL ESP
License:  CC BY 4.0
Share

Further Reading

OLDER

NEWER

(ESP-IDF)LVGL XML 显示图片

Recently Updated

  • (ESP-IDF)LVGL XML 绑定
  • (ESP-IDF)LVGL XML 显示图片
  • (ESP-IDF)LVGL XML 布局
  • (ESP-IDF)LVGL XML Components
  • (ESP-IDF)LVGL 模拟器

Trending Tags

LVGL WCH Linux Elec ThatProject freeRTOS STM ESP Flutter Others

Contents

©2026 松果工作室. Some rights reserved.

Using the Halo theme Chirpy