Skip to content

Cursor removed in read-only TextArea #5928

Description

@TomJGooding

You can still navigate and select the text in read-only mode, so don't we need the cursor?

Originally posted by @TomJGooding in #5925 (comment)

Here's an example to demonstrate:

from textual.app import App, ComposeResult
from textual.widgets import TextArea


class ExampleApp(App):
    def compose(self) -> ComposeResult:
        yield TextArea(
            "Try navigating by holding down the arrow keys. This is a "
            + "very, " * 10
            + "very long line. "
            + "While you're here, try pressing 'ctrl+shift+right'"
            + "Are we nearly there yet? This line seems endless!",
            read_only=True,
            soft_wrap=False,
        )


if __name__ == "__main__":
    app = ExampleApp()
    app.run()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions