faq tweak

This commit is contained in:
Will McGugan
2025-04-09 16:08:12 +01:00
parent b7c7ad5869
commit fd6cb52c1d
4 changed files with 6 additions and 60 deletions

View File

@@ -38,7 +38,9 @@ pip install textual-dev -U
<a name="how-can-i-select-and-copy-text-in-a-textual-app"></a>
## How can I select and copy text in a Textual app?
Running a Textual app puts your terminal in to *application mode* which disables clicking and dragging to select text.
Textual supports text selection for most widgets, via click and drag. Press ctrl+c to copy.
For widgets that don't yet support text selection, you can try and use your terminal's builtin support.
Most terminal emulators offer a modifier key which you can hold while you click and drag to restore the behavior you
may expect from the command line. The exact modifier key depends on the terminal and platform you are running on.
@@ -220,21 +222,6 @@ Greetings("Well hello", "there").run()
---
<a name="no-widget-called-textlog"></a>
## No widget called TextLog
The `TextLog` widget was renamed to `RichLog` in Textual 0.32.0.
You will need to replace all references to `TextLog` in your code, with `RichLog`.
Most IDEs will have a search and replace function which will help you do this.
Here's how you should import RichLog:
```python
from textual.widgets import RichLog
```
---
<a name="why-do-some-key-combinations-never-make-it-to-my-app"></a>
## Why do some key combinations never make it to my app?
@@ -325,17 +312,4 @@ There is currently a light and dark version of the design system, but more are p
---
<a name="why-doesnt-the-datatable-scroll-programmatically"></a>
## Why doesn't the `DataTable` scroll programmatically?
If scrolling in your `DataTable` is _apparently_ broken, it may be because your `DataTable` is using the default value of `height: auto`.
This means that the table will be sized to fit its rows without scrolling, which may cause the *container* (typically the screen) to scroll.
If you would like the table itself to scroll, set the height to something other than `auto`, like `100%`.
!!! note
As of Textual v0.31.0 the `max-height` of a `DataTable` is set to `100%`, this will mean that the above is no longer the default experience.
---
Generated by [FAQtory](https://github.com/willmcgugan/faqtory)

View File

@@ -5,7 +5,9 @@ alt_titles:
- "Highlighting and copy text not working"
---
Running a Textual app puts your terminal in to *application mode* which disables clicking and dragging to select text.
Textual supports text selection for most widgets, via click and drag. Press ctrl+c to copy.
For widgets that don't yet support text selection, you can try and use your terminal's builtin support.
Most terminal emulators offer a modifier key which you can hold while you click and drag to restore the behavior you
may expect from the command line. The exact modifier key depends on the terminal and platform you are running on.

View File

@@ -1,14 +0,0 @@
---
title: "Why doesn't the `DataTable` scroll programmatically?"
alt_titles:
- "Scroll bindings from `DataTable` not working."
- "Datatable cursor goes off screen and doesn't scroll."
---
If scrolling in your `DataTable` is _apparently_ broken, it may be because your `DataTable` is using the default value of `height: auto`.
This means that the table will be sized to fit its rows without scrolling, which may cause the *container* (typically the screen) to scroll.
If you would like the table itself to scroll, set the height to something other than `auto`, like `100%`.
!!! note
As of Textual v0.31.0 the `max-height` of a `DataTable` is set to `100%`, this will mean that the above is no longer the default experience.

View File

@@ -1,16 +0,0 @@
---
title: "No widget called TextLog"
alt_titles:
- "ImportError with TextLog"
- "TextLog does not exist"
---
The `TextLog` widget was renamed to `RichLog` in Textual 0.32.0.
You will need to replace all references to `TextLog` in your code, with `RichLog`.
Most IDEs will have a search and replace function which will help you do this.
Here's how you should import RichLog:
```python
from textual.widgets import RichLog
```