mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add control to TabbedContent message.
This commit is contained in:
20
CHANGELOG.md
20
CHANGELOG.md
@@ -21,12 +21,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Markdown document sub-widgets now reference the container document
|
- Markdown document sub-widgets now reference the container document
|
||||||
- Table of contents of a markdown document now references the document
|
- Table of contents of a markdown document now references the document
|
||||||
- Added the `control` property to messages
|
- Added the `control` property to messages
|
||||||
- `OptionList.OptionHighlighted` and `OptionList.OptionSelected`
|
|
||||||
- `Tree.NodeSelected`, `Tree.NodeHighlighted`, `Tree.NodeExpanded`, and `Tree.NodeCollapsed`
|
|
||||||
- `DirectoryTree.FileSelected`
|
- `DirectoryTree.FileSelected`
|
||||||
- `ListView.Highlighted` and `ListView.Selected`
|
- `ListView`
|
||||||
- `Markdown.TableOfContentsUpdated`, `Markdown.TableOfContentsSelected`, and `Markdown.LinkClicked`
|
- `Highlighted`
|
||||||
|
- `Selected`
|
||||||
|
- `Markdown`
|
||||||
|
- `TableOfContentsUpdated`
|
||||||
|
- `TableOfContentsSelected`
|
||||||
|
- `LinkClicked`
|
||||||
|
- `OptionList`
|
||||||
|
- `OptionHighlighted`
|
||||||
|
- `OptionSelected`
|
||||||
- `RadioSet.Changed`
|
- `RadioSet.Changed`
|
||||||
|
- `TabContent.TabActivated`
|
||||||
|
- `Tree`
|
||||||
|
- `NodeSelected`
|
||||||
|
- `NodeHighlighted`
|
||||||
|
- `NodeExpanded`
|
||||||
|
- `NodeCollapsed`
|
||||||
|
|
||||||
## [0.23.0] - 2023-05-03
|
## [0.23.0] - 2023-05-03
|
||||||
|
|
||||||
|
|||||||
@@ -96,9 +96,20 @@ class TabbedContent(Widget):
|
|||||||
tab: The Tab widget that was selected (contains the tab label).
|
tab: The Tab widget that was selected (contains the tab label).
|
||||||
"""
|
"""
|
||||||
self.tabbed_content = tabbed_content
|
self.tabbed_content = tabbed_content
|
||||||
|
"""The `TabbedContent` widget that contains the tab activated."""
|
||||||
self.tab = tab
|
self.tab = tab
|
||||||
|
"""The `Tab` widget that was selected (contains the tab label)."""
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def control(self) -> TabbedContent:
|
||||||
|
"""The `TabbedContent` widget that contains the tab activated.
|
||||||
|
|
||||||
|
This is an alias for [`TabActivated.tabbed_content`][textual.widgets.TabbedContent.TabActivated.tabbed_content]
|
||||||
|
and is used by the [`on`][textual.on] decorator.
|
||||||
|
"""
|
||||||
|
return self.tabbed_content
|
||||||
|
|
||||||
def __rich_repr__(self) -> Result:
|
def __rich_repr__(self) -> Result:
|
||||||
yield self.tabbed_content
|
yield self.tabbed_content
|
||||||
yield self.tab
|
yield self.tab
|
||||||
|
|||||||
Reference in New Issue
Block a user