Is there a text newline in the GUI Guider imgbtn widget?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Is there a text newline in the GUI Guider imgbtn widget?

ソリューションへジャンプ
1,475件の閲覧回数
seobi1111
Contributor III

Hello

I am developing using MIMXRT1170-EVK and GUI Guider.

The GUI Guider version is as follows.

 

   - GUI Guider : v1.7.0

 

I Want to display text in 2 lines in the imgbtn widget.

Please answer about my question.

0 件の賞賛
返信
1 解決策
1,436件の閲覧回数
seobi1111
Contributor III

Hi~ EdwinHz

Thanks for your reply.

It's not in the GUI Guider widget properties, but I modified it in the code as you mentioned and it works fine.

Thank you again.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,448件の閲覧回数
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @seobi1111,

To add text to a button, one should call the lv_label_set_text() function. For a "normal" button, like this, when adding text in two different lines like this, the generated function is as follows:

EdwinHz_0-1707952251978.png

lv_label_set_text(ui->screen_btn_1_label, "1st line\n2nd line");

 

For the imgbtn widget, the textbox under "Attribute" in GUI Guider does not allow you to add line breaks, but you should be able to edit the lv_label_set_text() function that corresponds to the imgbtn widget and add a "\n" manually to see a line break on the imgbtn.

I hope this helps,
Edwin.

 

0 件の賞賛
返信
1,437件の閲覧回数
seobi1111
Contributor III

Hi~ EdwinHz

Thanks for your reply.

It's not in the GUI Guider widget properties, but I modified it in the code as you mentioned and it works fine.

Thank you again.

0 件の賞賛
返信