Skip to content

Commit 5510ac3

Browse files
committed
tooltip on code editor
1 parent 28e55c5 commit 5510ac3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/textual/widgets/_text_area.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ def code_editor(
480480
id: str | None = None,
481481
classes: str | None = None,
482482
disabled: bool = False,
483+
tooltip: RenderableType | None = None,
483484
) -> TextArea:
484485
"""Construct a new `TextArea` with sensible defaults for editing code.
485486
@@ -497,6 +498,7 @@ def code_editor(
497498
id: The ID of the widget, used to refer to it from Textual CSS.
498499
classes: One or more Textual CSS compatible class names separated by spaces.
499500
disabled: True if the widget is disabled.
501+
tooltip: Optional tooltip
500502
"""
501503
return cls(
502504
text,
@@ -511,6 +513,7 @@ def code_editor(
511513
id=id,
512514
classes=classes,
513515
disabled=disabled,
516+
tooltip=tooltip,
514517
)
515518

516519
@staticmethod

0 commit comments

Comments
 (0)