Tab.cs 661 B

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