When creating the component for the message box, I needed to expose the buttons to the outside for handling the click events, but I couldn't export them.
lvgl xml slot doc
<component>
<previews>
<preview width="854" height="480" style_bg_color="0x16161B" />
</previews>
<api>
<prop name="title" type="string" default="tr_bluetooth_input_pin" />
<!-- BUG:The editor does not support this slot syntax feature. -->
<slot name="button_cancel" />
<slot name="button_connect" />
</api>
<view width="#th_size_messagebox_width" height="#th_size_messagebox_height" align="center" style_border_width="0">
<style name="th_style_messagebox_base" />
<lv_label translation_tag="$title" align="top_mid" y="24">
<style name="th_style_font_title" />
</lv_label>
<!-- The password input box automatically gains focus. -->
<!-- The text is not centered. -->
<textarea width="90%" align="center" text="" focused="true">
<event_cb callback="on_textarea_password_changed" trigger="value_changed" user_data="button_connect" />
</textarea>
<button_second name="button_cancel" align="bottom_left" text="tr_cancel" x="24" y="-16">
<subject_set_int_event subject="messagebox_bluetooth_connect_visible" trigger="clicked" value="0" />
</button_second>
<!-- Default disable button. Wait for entering the PIN code. disabled="true" -->
<button_primary name="button_connect" align="bottom_right" text="tr_connect" x="-24" y="-16">
<subject_set_int_event subject="messagebox_bluetooth_connect_visible" trigger="clicked" value="0" />
<subject_set_int_event subject="settings_bluetooth_status" trigger="clicked" value="1" />
</button_primary>
</view>
</component>
When creating the component for the message box, I needed to expose the buttons to the outside for handling the click events, but I couldn't export them.
lvgl xml slot doc