Skip to content

Column width ignored when set inside of a Container of a set width #3598

Open
@brycepg

Description

@brycepg

Duplicate Check

Describe the bug

The column width is completely ignored inside of a container

Code

import flet as ft

def main(page: ft.Page):
    display_elements = [
        ft.Text("FDS SDF SDF DSF SDF SD FDSF DS FDS FSD FDS DSF SD FDSFDS SDFDSFSD SDFFDSFDSF SDFDSFD SFDS FSDFDSF SD FDSF SDDFS FSDDFS FSD FSDF SDFSD")
    ]
    display_elements_column = ft.Column(display_elements, width=100, horizontal_alignment=ft.CrossAxisAlignment.CENTER)
    display_elements_column = ft.Container(
        display_elements_column,
        width=page.window.width,
        height=page.window.height,
    )
    page.add(display_elements_column)

ft.app(main)

To reproduce

Run code above -> no wrapping due to column width

delete container -> wrapping due to column width works fine

Expected behavior

No response

Screenshots

No response

Operating System

Linux

Operating system details

Fedora

Flet version

0.23.2

Regression

No, it isn't

Suggestions

No response

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions