forked from Textualize/textual
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0696468
commit 3f28a36
Showing
6 changed files
with
96 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: issues | ||
on: | ||
issues: | ||
types: [closed] | ||
jobs: | ||
add-comment: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Did I solve your problem? | ||
uses: peter-evans/create-or-update-comment@a35cf36e5301d70b76f316e867e7788a55a31dae | ||
with: | ||
issue-number: ${{ github.event.issue.number }} | ||
body: | | ||
Did I solve your problem? | ||
Consider [sponsoring my work](https://github.com/sponsors/willmcgugan) on Textual with a monthly donation. | ||
Or buy me a [coffee](https://ko-fi.com/willmcgugan) to say thanks. | ||
– [Will McGugan](https://twitter.com/willmcgugan) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from rich.table import Table | ||
from rich.measure import Measurement | ||
|
||
from textual import events | ||
from textual.app import App | ||
from textual.widgets import Header, Footer, ScrollView | ||
|
||
|
||
class MyApp(App): | ||
"""An example of a very simple Textual App""" | ||
|
||
async def on_load(self, event: events.Load) -> None: | ||
await self.bind("q", "quit", "Quit") | ||
|
||
async def on_mount(self, event: events.Mount) -> None: | ||
|
||
self.body = body = ScrollView() | ||
#body.virtual_size.width = 300 | ||
|
||
await self.view.dock(body) | ||
|
||
async def add_content(): | ||
table = Table(title="Demo", width=1000) | ||
|
||
for i in range(40): | ||
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)]) | ||
|
||
await body.update(table) | ||
|
||
await self.call_later(add_content) | ||
|
||
|
||
MyApp.run(title="Simple App", log="textual.log") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters