Tab.cs 685 B

1234567891011121314151617181920212223242526
  1. namespace Terminal.Gui;
  2. /// <summary>A single tab in a <see cref="TabView"/>.</summary>
  3. public class Tab : View
  4. {
  5. private string _displayText;
  6. /// <summary>Creates a new unnamed tab with no controls inside.</summary>
  7. public Tab ()
  8. {
  9. BorderStyle = LineStyle.Rounded;
  10. CanFocus = true;
  11. }
  12. /// <summary>The text to display in a <see cref="TabView"/>.</summary>
  13. /// <value></value>
  14. public string DisplayText
  15. {
  16. get => _displayText ?? "Unnamed";
  17. set => _displayText = value;
  18. }
  19. /// <summary>The control to display when the tab is selected.</summary>
  20. /// <value></value>
  21. public View View { get; set; }
  22. }