I have 2 Text()
inside page.control
, then I run it but I found margin/distance between Text()
, I want to remove it
code
from flet import *
def main(page: Page):
page.controls = [
Text("hello world"),
Text("hello world")
]
page.update()
app(main)
code and output:
I tried looking for a certain attribute but I was confused
I have 2 Text()
inside page.control
, then I run it but I found margin/distance between Text()
, I want to remove it
code
from flet import *
def main(page: Page):
page.controls = [
Text("hello world"),
Text("hello world")
]
page.update()
app(main)
code and output:
I tried looking for a certain attribute but I was confused
Share Improve this question edited Jan 22 at 18:15 James Z 12.3k10 gold badges27 silver badges47 bronze badges asked Jan 19 at 5:38 KiueeukouKiueeukou 34 bronze badges1 Answer
Reset to default 0You might want to delete spacing between Text()
in flet as vertically, you can edit spacing using page.spacing
to edit vertical spacing in flet
bellow is no spacing vertically:
from flet import *
def main(page: Page):
page.spacing = 0
page.controls = [
Text("hello world"),
Text("hello world"),
]
page.update()
app(main)
bellow is spacing vertically but 300:
from flet import *
def main(page: Page):
page.spacing = 300
page.controls = [
Text("hello world"),
Text("hello world"),
]
page.update()
app(main)
Hope this helps!