fix for scrollview space

This commit is contained in:
Will McGugan
2021-09-19 21:09:31 +01:00
parent 4903e7c79f
commit 368971045d
11 changed files with 116 additions and 54 deletions

View File

@@ -20,10 +20,10 @@ class MyApp(App):
async def add_content():
table = Table(title="Demo")
for i in range(40):
for i in range(20):
table.add_column(f"Col {i + 1}", style="magenta")
for i in range(200):
table.add_row(*[f"cell {i},{j}" for j in range(40)])
for i in range(100):
table.add_row(*[f"cell {i},{j}" for j in range(20)])
await body.update(table)

View File

@@ -12,7 +12,6 @@ from rich.padding import Padding
from rich.text import Text
from textual.app import App
from textual import events
from textual.reactive import Reactive
from textual.views import GridView
from textual.widget import Widget

View File

@@ -17,7 +17,7 @@ class MyApp(App):
"""Create and dock the widgets."""
# A scrollview to contain the markdown file
body = ScrollView()
body = ScrollView(gutter=1)
# Header / footer / dock
await self.view.dock(Header(), edge="top")