simplify example

This commit is contained in:
Will McGugan
2021-08-07 12:15:27 +01:00
parent ee825ab1f6
commit 0995fbc69e

View File

@@ -1,8 +1,6 @@
from textual.app import App from textual.app import App
from textual import events from textual import events
from textual.view import View
from textual.widgets import Placeholder from textual.widgets import Placeholder
from textual.layouts.grid import GridLayout
class GridTest(App): class GridTest(App):
@@ -17,7 +15,8 @@ class GridTest(App):
grid.add_areas(center="col-2-start|col-4-end,row-2-start|row-3-end") grid.add_areas(center="col-2-start|col-4-end,row-2-start|row-3-end")
grid.set_align("stretch", "center") grid.set_align("stretch", "center")
grid.place(*(Placeholder() for _ in range(20)), center=Placeholder()) placeholders = [Placeholder() for _ in range(20)]
grid.place(*placeholders, center=Placeholder())
GridTest.run(title="Grid Test", log="textual.log") GridTest.run(title="Grid Test", log="textual.log")