mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 13:28:16 +08:00
Add tree example
This commit is contained in:

committed by
Patrik Svensson

parent
1aa958ced3
commit
87e6b42409
@ -55,7 +55,7 @@ namespace Spectre.Console
|
||||
/// <param name="content">The panel content.</param>
|
||||
public Panel(IRenderable content)
|
||||
{
|
||||
_child = content ?? throw new System.ArgumentNullException(nameof(content));
|
||||
_child = content ?? throw new ArgumentNullException(nameof(content));
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
@ -73,7 +73,7 @@ namespace Spectre.Console
|
||||
var root = new TreeNode(Text.Empty);
|
||||
foreach (var node in Nodes)
|
||||
{
|
||||
root.AddChild(node);
|
||||
root.AddNode(node);
|
||||
}
|
||||
|
||||
return MeasureAtDepth(context, maxWidth, root, depth: 0);
|
||||
@ -97,7 +97,7 @@ namespace Spectre.Console
|
||||
var root = new TreeNode(Text.Empty);
|
||||
foreach (var node in Nodes)
|
||||
{
|
||||
root.AddChild(node);
|
||||
root.AddNode(node);
|
||||
}
|
||||
|
||||
return Enumerable.Empty<Segment>()
|
||||
|
Reference in New Issue
Block a user