I want to align this object to the right.
The two objects are children of the container that has the flex layout.
I can’t align the second object (object highlighted in the image above) to the right.
Which version of LVGL you use ?
LVGL v8.1 (master)
As far as I understand you should use flex alignment. But I didn’t use v8, so maybe someone else can explain this.
If I use flexible alignment, I have to align all children of the container (
lv_obj_set_style_flex_cross_place(cont, LV_FLEX_ALIGN_END, 0)) and I just want to align the second object to the left (
Align-self is not supported by LVGL at this moment.
As workaround I suggest this:
- Create a width=100% wrapper object for each text box
- Align these wrappers into a column with flex
LV_ALIGN_TOP_LEFT/RIGHTon the text boxes.