Tab.cs 727 B

123456789101112131415161718192021222324252627
  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. //TabStop = TabBehavior.TabGroup;
  12. }
  13. /// <summary>The text to display in a <see cref="TabView"/>.</summary>
  14. /// <value></value>
  15. public string DisplayText
  16. {
  17. get => _displayText ?? "Unnamed";
  18. set => _displayText = value;
  19. }
  20. /// <summary>The control to display when the tab is selected.</summary>
  21. /// <value></value>
  22. public View View { get; set; }
  23. }