Vertical and horitzontal Scroll at the same time #3483
-
Hello everybody: I have this code in order to make my layout scrollable in vertical and horitzontal way, but it's impossible:
When I uncomment the row's scrolls it doesn't work. Some help please? |
Beta Was this translation helpful? Give feedback.
Answered by
nastiliano
Jun 23, 2024
Replies: 1 comment 2 replies
-
import flet as ft
def main(page: ft.Page):
page.add(
ft.Card(
ft.Container(
ft.Column(
horizontal_alignment=ft.CrossAxisAlignment.CENTER,
controls=[ # here the important part - start
ft.Row(
[
ft.Container(
ft.Column(
[
ft.Image(src=f"https://picsum.photos/500?random={_}", width=500, height=500, fit=ft.ImageFit.NONE)
for _ in range(5)
],
scroll="auto",
expand=True
),
width=500,
height=500
)
],
scroll="auto",
expand=True
),
ft.TextField(label = "Hello World" , width = 400 ,)
] # here the important part - end
),
expand=True,
bgcolor="background",
alignment=ft.alignment.center
),
expand=True
)
)
ft.app(target=main) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Finally!!!
That is that I wanted: