fixed ListView test wrt AllowNegativeXWhenWidthGreaterThanContentWidth

This commit is contained in:
Tig
2024-11-18 14:43:47 -07:00
parent e782c0e538
commit 5c2035d894
2 changed files with 6 additions and 3 deletions

View File

@@ -80,7 +80,9 @@ public class ListViewWithSelection : Scenario
Width = Dim.Func (() => _listView?.MaxLength ?? 10),
Height = Dim.Fill (),
AllowsMarking = false,
AllowsMultipleSelection = false
AllowsMultipleSelection = false,
BorderStyle = LineStyle.Dotted,
Arrangement = ViewArrangement.Resizable
};
_listView.RowRender += ListView_RowRender;
_appWindow.Add (_listView);
@@ -106,6 +108,7 @@ public class ListViewWithSelection : Scenario
_listView.Accepting += (s, a) => LogEvent (s as View, a, "Accept");
_listView.Selecting += (s, a) => LogEvent (s as View, a, "Select");
_listView.VerticalScrollBar.AutoShow = true;
_listView.HorizontalScrollBar.AutoShow = true;
bool? LogEvent (View sender, EventArgs args, string message)
{

View File

@@ -790,10 +790,10 @@ Item 6",
var lv = new ListView
{
X = 1,
Width = 10,
Height = 5,
Source = new ListWrapper<string> (source)
};
lv.Height = lv.Source.Count;
lv.Width = lv.MaxLength;
var top = new Toplevel ();
top.Add (lv);
Application.Begin (top);