Hello,
As I want to use long texts in a button widget with a circular scroll, I defined a label.set_width().
Unfortunately, with V8.1 (it worked on 7.1), I’m not able to align text at the center of the button if I define a width for the label, even if I use the label.align(lv.ALIGN.CENTER,0,0)
or label.align(lv.TEXT_ALIGN.CENTER,0,0)
command.
But it works if I delete the label.set_width() command.
Here an example of the code used :
scr = lv.obj()
btn = lv.btn(scr)
btn.align(lv.ALIGN.CENTER, 0, 0)
btn.set_size(210,40)
label = lv.label(btn)
label.set_width(200)
label.align(lv.TEXT_ALIGN.CENTER,0,0)
label.set_text('Hello World!')
lv.scr_load(scr)
Is there another way to align the text ?
Thanks