File tree Expand file tree Collapse file tree 7 files changed +446
-1065
lines changed Expand file tree Collapse file tree 7 files changed +446
-1065
lines changed Original file line number Diff line number Diff line change 1
1
#nullable enable
2
+ using System . Net . Security ;
3
+
2
4
namespace Terminal . Gui ;
3
5
4
6
/// <summary>A single tab in a <see cref="TabView"/>.</summary>
@@ -11,7 +13,9 @@ public Tab ()
11
13
{
12
14
BorderStyle = LineStyle . Rounded ;
13
15
CanFocus = true ;
14
- TabStop = TabBehavior . NoStop ;
16
+ TabStop = TabBehavior . TabStop ;
17
+ Width = Dim . Auto ( DimAutoStyle . Text ) ;
18
+ SuperViewRendersLineCanvas = true ;
15
19
}
16
20
17
21
/// <summary>The text to display in a <see cref="TabView"/>.</summary>
@@ -26,7 +30,7 @@ public string DisplayText
26
30
}
27
31
}
28
32
29
- /// <summary>The control to display when the tab is selected.</summary>
33
+ /// <summary>The View that will be made visible in the <see cref="TabView"/> content area when the tab is selected.</summary>
30
34
/// <value></value>
31
35
public View ? View { get ; set ; }
32
36
}
Original file line number Diff line number Diff line change 1
1
namespace Terminal . Gui ;
2
2
3
- /// <summary>Describes a change in <see cref="TabView.SelectedTab "/></summary>
3
+ /// <summary>Describes a change in <see cref="TabView.SelectedTabIndex "/></summary>
4
4
public class TabChangedEventArgs : EventArgs
5
5
{
6
6
/// <summary>Documents a tab change</summary>
7
- /// <param name="oldTab "></param>
8
- /// <param name="newTab "></param>
9
- public TabChangedEventArgs ( Tab oldTab , Tab newTab )
7
+ /// <param name="oldTabIndex "></param>
8
+ /// <param name="newTabIndex "></param>
9
+ public TabChangedEventArgs ( int ? oldTabIndex , int ? newTabIndex )
10
10
{
11
- OldTab = oldTab ;
12
- NewTab = newTab ;
11
+ OldTabIndex = oldTabIndex ;
12
+ NewTabIndex = newTabIndex ;
13
13
}
14
14
15
- /// <summary>The currently selected tab. May be null </summary>
16
- public Tab NewTab { get ; }
15
+ /// <summary>The currently selected tab.</summary>
16
+ public int ? NewTabIndex { get ; }
17
17
18
- /// <summary>The previously selected tab. May be null </summary>
19
- public Tab OldTab { get ; }
18
+ /// <summary>The previously selected tab.</summary>
19
+ public int ? OldTabIndex { get ; }
20
20
}
You can’t perform that action at this time.
0 commit comments